]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/nntpd: add test for the XPATH command
authorEric Wong <e@80x24.org>
Fri, 11 Sep 2020 07:32:32 +0000 (07:32 +0000)
committerEric Wong <e@80x24.org>
Sat, 12 Sep 2020 20:29:12 +0000 (20:29 +0000)
It's only in RFC 2980 (not 977 or 3977), but Net::NNTP has
supported it since 2001, at least.  We'll be making changes
to avoid pathological behavior, so test it, first.

t/nntpd.t

index a3d974cfd2d92b6b6f1c995e9c720cc6287f0ce7..14db1a93019771426635cecc8fafedd9d2c7c920 100644 (file)
--- a/t/nntpd.t
+++ b/t/nntpd.t
@@ -295,6 +295,8 @@ Date: Fri, 02 Oct 1993 00:00:00 +0000
                'cross newsgroup BODY by Message-ID');
        ok($n->head('<testmessage@example.com>'),
                'cross newsgroup HEAD by Message-ID');
+       is($n->xpath('<testmessage@example.com>'), 'x.y.z/1', 'xpath hit');
+       is($n->xpath('<non-existent@example.com>'), undef, 'xpath miss');
 
        # pipelined requests:
        {