From 044a5406e57eeeec8f8c2076322a6d7f5f8374c9 Mon Sep 17 00:00:00 2001 From: Amos Wenger Date: Thu, 1 Aug 2024 21:41:35 +0200 Subject: [PATCH] Add code coverage for error (missing separator) --- tests/parsing.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/parsing.rs b/tests/parsing.rs index 984b5554f..e0600e410 100644 --- a/tests/parsing.rs +++ b/tests/parsing.rs @@ -363,7 +363,10 @@ fn rfc_3339_err() { PrimitiveDateTime::parse("2021-01-0", &Rfc3339), invalid_component!("day") )); - // (note: any separator is allowed by RFC 3339) + assert!(matches!( + PrimitiveDateTime::parse("2021-01-01", &Rfc3339), + invalid_component!("separator") + )); assert!(matches!( PrimitiveDateTime::parse("2021-01-01T0", &Rfc3339), invalid_component!("hour")