about summary refs log tree commit homepage
path: root/t/nntpd.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-12-13 03:10:11 +0000
committerEric Wong <e@80x24.org>2016-12-13 03:46:23 +0000
commited15c484cdc3daec5abe224a349c083ec3b2db53 (patch)
tree58287f8d5edebbadc3ca1c65c29260c5f8adfcda /t/nntpd.t
parentba1766313c85b20d86c7b92e2f62b85eade64f1b (diff)
downloadpublic-inbox-ed15c484cdc3daec5abe224a349c083ec3b2db53.tar.gz
We may not always use strftime and may implement caching.
But for now, just add a test.
Diffstat (limited to 't/nntpd.t')
-rw-r--r--t/nntpd.t8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/nntpd.t b/t/nntpd.t
index 7192d781..ad50a64f 100644
--- a/t/nntpd.t
+++ b/t/nntpd.t
@@ -203,6 +203,14 @@ EOF
                  'XHDR on invalid header returns empty');
 
         {
+                my $t0 = time;
+                my $date = $n->date;
+                my $t1 = time;
+                ok($date >= $t0, 'valid date after start');
+                ok($date <= $t1, 'valid date before stop');
+        }
+
+        {
                 setsockopt($s, IPPROTO_TCP, TCP_NODELAY, 1);
                 syswrite($s, 'HDR List-id 1-');
                 select(undef, undef, undef, 0.15);