Browse files

Some more test cases around the "2 hours ago" concept.

  • Loading branch information...
1 parent a07cc61 commit 737e1a5150f38ffb0659221dcc288e3374df4763 @kientzle kientzle committed Sep 3, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 libarchive/test/test_archive_getdate.c
View
4 libarchive/test/test_archive_getdate.c
@@ -45,6 +45,10 @@ DEFINE_TEST(test_archive_getdate)
assertEqualInt(get_date(now, "02/17/99 7:11am est"), 919253460);
assertEqualInt(get_date(now, "now - 2 hours"),
get_date(now, "2 hours ago"));
+ assertEqualInt(get_date(now, "2 hours ago"),
+ get_date(now, "+2 hours ago"));
+ assertEqualInt(get_date(now, "now - 2 hours"),
+ get_date(now, "-2 hours"));
/* It's important that we handle ctime() format. */
assertEqualInt(get_date(now, "Sun Feb 22 17:38:26 PST 2009"),
1235353106);

0 comments on commit 737e1a5

Please sign in to comment.