diff options
author | dfhoughton <dfhoughton@gmail.com> | 2019-02-10 16:35:23 -0500 |
---|---|---|
committer | dfhoughton <dfhoughton@gmail.com> | 2019-02-10 16:35:23 -0500 |
commit | 72efcceb945fb80a576775a513b64e104078e9f0 (patch) | |
tree | 8988e40d08276cf6f8e723cf5fcb79af63b1eb7b /tests | |
parent | 46b9401a350645472ded762adce28db7545895c0 (diff) | |
download | two-timer-72efcceb945fb80a576775a513b64e104078e9f0.zip |
added specific_time rule
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tests.rs | 16 |
1 files changed, 16 insertions, 0 deletions
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 |