From 72efcceb945fb80a576775a513b64e104078e9f0 Mon Sep 17 00:00:00 2001 From: dfhoughton Date: Sun, 10 Feb 2019 16:35:23 -0500 Subject: added specific_time rule --- tests/tests.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests/tests.rs') diff --git a/tests/tests.rs b/tests/tests.rs index b4c5b5d..7ee0325 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -1448,3 +1448,19 @@ fn the_31st() { } } } + +#[test] +fn specific_time() { + let d1 = NaiveDate::from_ymd(1969, 5, 6).and_hms(12, 3, 5); + let d2 = d1 + Duration::seconds(1); + match parse("1969-05-06 12:03:05", 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