summaryrefslogtreecommitdiff
path: root/tests/tests.rs
diff options
context:
space:
mode:
authordfhoughton <dfhoughton@gmail.com>2019-02-16 11:01:17 -0500
committerdfhoughton <dfhoughton@gmail.com>2019-02-16 11:01:17 -0500
commit06c54e9a128441a078b41a6d66076c8db63be0e0 (patch)
treea95d924a594f997a422dca6ed03c8ce013a2c01c /tests/tests.rs
parent72efcceb945fb80a576775a513b64e104078e9f0 (diff)
downloadtwo-timer-06c54e9a128441a078b41a6d66076c8db63be0e0.zip
remove need for space between hour and AM/PM
Diffstat (limited to 'tests/tests.rs')
-rw-r--r--tests/tests.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/tests.rs b/tests/tests.rs
index 7ee0325..9f7f1ca 100644
--- a/tests/tests.rs
+++ b/tests/tests.rs
@@ -1463,4 +1463,20 @@ fn specific_time() {
assert!(false, "didn't match");
}
}
+}
+
+#[test]
+fn no_space_before_pm() {
+ let d1 = NaiveDate::from_ymd(1969, 5, 6).and_hms(13, 0, 0);
+ let d2 = d1 + Duration::hours(1);
+ match parse("1969-05-06 at 1PM", 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