From 1cb9f467c2e18308dd4b21793f84ee40ff8c62e5 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 23 Apr 2023 20:04:44 +0200 Subject: [PATCH] add more tests --- tests/simple.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/simple.rs b/tests/simple.rs index cca53ff..8703a43 100644 --- a/tests/simple.rs +++ b/tests/simple.rs @@ -101,4 +101,8 @@ fn test_duration_parsing() { from_str("1 year 2 months 4 weeks 3 days and 2 seconds").unwrap(), Duration::seconds(39_398_402) ); + assert_eq!( + from_str("1 year 2 months 4 weeks 3 days and 2 seconds ago").unwrap(), + Duration::seconds(-39_398_402) + ); }