From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 2/3] t/nntpd: add test for the XPATH command
Date: Fri, 11 Sep 2020 07:32:32 +0000 [thread overview]
Message-ID: <20200911073233.29895-3-e@80x24.org> (raw)
In-Reply-To: <20200911073233.29895-1-e@80x24.org>
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 | 2 ++
1 file changed, 2 insertions(+)
diff --git a/t/nntpd.t b/t/nntpd.t
index a3d974cf..14db1a93 100644
--- 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:
{
next prev parent reply other threads:[~2020-09-11 7:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-11 7:32 [PATCH 0/3] mostly NNTP stuff Eric Wong
2020-09-11 7:32 ` [PATCH 1/3] treewide: avoid `goto &NAME' for tail recursion Eric Wong
2020-09-11 7:32 ` Eric Wong [this message]
2020-09-11 7:32 ` [PATCH 3/3] nntp: share more code between art_lookup callers Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200911073233.29895-3-e@80x24.org \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).