From e3df19074be7c5f4a175b415291434048eb811e1 Mon Sep 17 00:00:00 2001 From: dfhoughton Date: Sun, 17 Feb 2019 17:12:09 -0500 Subject: making test a bit more thorough --- tests/tests.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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 -- cgit v1.2.3