Skip to content

Commit f37004e

Browse files
types: duration: Add test for empty string and PT0S
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
1 parent dd027ab commit f37004e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

xsd-types/src/types/duration.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ mod tests {
301301

302302
#[test]
303303
fn duration_parsing_test() {
304+
assert_eq!(Duration::from_str(""), Duration::from_str("PT0S"));
305+
check_valid("PT0S");
304306
check_valid("P2Y6M5DT12H35M30S");
305307
check_valid("P1DT2H");
306308
check_valid("P20M");

0 commit comments

Comments
 (0)