summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/tests.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/tests.rs b/tests/tests.rs
index 9f7f1ca..902cce3 100644
--- a/tests/tests.rs
+++ b/tests/tests.rs
@@ -1479,4 +1479,26 @@ fn no_space_before_pm() {
assert!(false, "didn't match");
}
}
+ let d2 = d1 + Duration::minutes(1);
+ match parse("1969-05-06 at 1:00PM", None) {
+ Ok((start, end, _)) => {
+ assert_eq!(d1, start);
+ assert_eq!(d2, end);
+ }
+ Err(e) => {
+ println!("{:?}", e);
+ assert!(false, "didn't match");
+ }
+ }
+ let d2 = d1 + Duration::seconds(1);
+ match parse("1969-05-06 at 1:00:00PM", None) {
+ Ok((start, end, _)) => {
+ assert_eq!(d1, start);
+ assert_eq!(d2, end);
+ }
+ Err(e) => {
+ println!("{:?}", e);
+ assert!(false, "didn't match");
+ }
+ }
} \ No newline at end of file