about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-09-22 10:09:48 +0000
committerEric Wong <e@80x24.org>2015-09-22 22:12:20 +0000
commite41a7b0db983b38f77f535b432e33a021b5bab38 (patch)
tree0e58b921821cf2b67ff5a1022bf592101f629a55 /t
parentb25ee445c9c66d8e41b889196668bf2b26a54d53 (diff)
downloadpublic-inbox-e41a7b0db983b38f77f535b432e33a021b5bab38.tar.gz
This is allowed by RFC 2980 and HDR (to-be-implemented) in
RFC 3977 supports it, too.
Diffstat (limited to 't')
-rw-r--r--t/nntpd.t11
1 files changed, 10 insertions, 1 deletions
diff --git a/t/nntpd.t b/t/nntpd.t
index 090e1500..28d84910 100644
--- a/t/nntpd.t
+++ b/t/nntpd.t
@@ -90,7 +90,8 @@ EOF
         $! = 0;
         fcntl($sock, F_SETFD, $fl |= FD_CLOEXEC);
         ok(! $!, 'no error from fcntl(F_SETFD)');
-        my $n = Net::NNTP->new($sock->sockhost . ':' . $sock->sockport);
+        my $host_port = $sock->sockhost . ':' . $sock->sockport;
+        my $n = Net::NNTP->new($host_port);
         my $list = $n->list;
         is_deeply($list, { $group => [ qw(1 1 n) ] }, 'LIST works');
         is_deeply([$n->group($group)], [ qw(0 1 1), $group ], 'GROUP works');
@@ -112,6 +113,14 @@ EOF
                           "$k by article number works");
         }
 
+        {
+                my $nogroup = Net::NNTP->new($host_port);
+                while (my ($k, $v) = each %xhdr) {
+                        is_deeply($nogroup->xhdr("$k $mid"), { $mid => $v },
+                                  "$k by message-id works without group");
+                }
+        }
+
         # TODO: upgrades and such
 
         ok(kill('TERM', $pid), 'killed nntpd');