Skip to content

Commit

Permalink
types: duration: Add test for empty string and PT0S
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick José Pereira <[email protected]>
  • Loading branch information
patrickelectric committed Sep 19, 2024
1 parent dd027ab commit f37004e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xsd-types/src/types/duration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ mod tests {

#[test]
fn duration_parsing_test() {
assert_eq!(Duration::from_str(""), Duration::from_str("PT0S"));
check_valid("PT0S");
check_valid("P2Y6M5DT12H35M30S");
check_valid("P1DT2H");
check_valid("P20M");
Expand Down

0 comments on commit f37004e

Please sign in to comment.