]> granicus.if.org Git - neomutt/commitdiff
test: improve test_mutt_date_make_tls()
authorRichard Russon <rich@flatcap.org>
Thu, 30 May 2019 09:34:25 +0000 (10:34 +0100)
committerRichard Russon <rich@flatcap.org>
Thu, 30 May 2019 10:08:48 +0000 (11:08 +0100)
test/date/mutt_date_make_tls.c

index b51e3a7b80cf5d715458a382f8e29f7230cdc486..79409db05415c2f2c67adfaebc66aa53e2290973 100644 (file)
@@ -32,4 +32,11 @@ void test_mutt_date_make_tls(void)
   {
     TEST_CHECK(mutt_date_make_tls(NULL, 10, 0) != 0);
   }
+
+  {
+    char buf[64] = { 0 };
+    time_t t = 961930800;
+    TEST_CHECK(mutt_date_make_tls(buf, sizeof(buf), t) > 0);
+    TEST_CHECK(strcmp(buf, "Sun, 25 Jun 2000 11:00:00 UTC") == 0);
+  }
 }