diff options
author | dfhoughton <dfhoughton@gmail.com> | 2019-01-05 16:20:29 -0500 |
---|---|---|
committer | dfhoughton <dfhoughton@gmail.com> | 2019-01-05 16:20:29 -0500 |
commit | b92350ef6a37fd5e388b77e7eef202878d964922 (patch) | |
tree | 0ad7bab2354f6884f719b39bc6e5d9615aec96fa /tests | |
parent | 4d885eff8c4c745348126e96cf7cf46d478f30bb (diff) | |
download | two-timer-b92350ef6a37fd5e388b77e7eef202878d964922.zip |
made space optional before era suffix
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tests.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/tests.rs b/tests/tests.rs index 31ef9fb..c77eb1a 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -852,6 +852,24 @@ fn april_3_25_ad() { } #[test] +fn april_3_25bc() { + let d1 = NaiveDate::from_ymd(-24, 4, 3).and_hms(0, 0, 0); + let d2 = d1 + Duration::days(1); + let (start, end, _) = parse("April 3, 25BC", None).unwrap(); + assert_eq!(d1, start); + assert_eq!(d2, end); +} + +#[test] +fn april_3_25ad() { + let d1 = NaiveDate::from_ymd(25, 4, 3).and_hms(0, 0, 0); + let d2 = d1 + Duration::days(1); + let (start, end, _) = parse("April 3, 25AD", None).unwrap(); + assert_eq!(d1, start); + assert_eq!(d2, end); +} + +#[test] fn this_weekend() { let now = NaiveDate::from_ymd(1969, 5, 6).and_hms(0, 0, 0); let d1 = NaiveDate::from_ymd(1969, 5, 10).and_hms(0, 0, 0); |