* [PATCH 11/12] t/nntpd.t: simplify condition for response termination
2015-09-30 21:00 5% [PATCH 0/12] another round of NNTP updates Eric Wong
@ 2015-09-30 21:00 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2015-09-30 21:00 UTC (permalink / raw)
To: meta
Multiline responses must end with "\r\n.\r\n", so we won't
break out early in case the OS doesn't support MSG_MORE.
---
t/nntpd.t | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/nntpd.t b/t/nntpd.t
index e4c0244..8a721e2 100644
--- a/t/nntpd.t
+++ b/t/nntpd.t
@@ -130,7 +130,7 @@ EOF
syswrite($s, "HDR $k $mid\r\n");
do {
sysread($s, $buf, 4096, length($buf));
- } until ($buf =~ /^[^2]../ || $buf =~ /\r\n\.\r\n\z/);
+ } until ($buf =~ /\r\n\.\r\n\z/);
my @r = split("\r\n", $buf);
like($r[0], qr/\A224 /, '224 response for HDR');
is($r[1], "0 $v", 'got expected response for HDR');
@@ -167,7 +167,7 @@ EOF
$buf = '';
do {
sysread($s, $buf, 4096, length($buf));
- } until ($buf =~ /^[^2]../ || $buf =~ /\r\n\.\r\n\z/);
+ } until ($buf =~ /\r\n\.\r\n\z/);
my @r = split("\r\n", $buf);
like($r[0], qr/^224 /, 'got 224 response for OVER');
is($r[1], "0\thihi\tMe <me\@example.com>\t" .
--
EW
^ permalink raw reply related [relevance 7%]
* [PATCH 0/12] another round of NNTP updates
@ 2015-09-30 21:00 5% Eric Wong
2015-09-30 21:00 7% ` [PATCH 11/12] t/nntpd.t: simplify condition for response termination Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2015-09-30 21:00 UTC (permalink / raw)
To: meta
This is probably performant enough for practical use :)
Eric Wong (12):
search: remove get_subject_path
nntp: HDR returns 225, not 224
nntp: reduce syscalls for LIST OVERVIEW.FMT
remove unnecessary fields usage
daemon: always autoflush stdout/stderr
nntpd: avoid lazy require
INSTALL: document Danga::Socket dependency for nntpd
nntp: MODE READER denies posting
nntp: implement LIST HEADERS
nntp: implement OVER/XOVER summary in search document
t/nntpd.t: simplify condition for response termination
t/nntpd.t: additional tests for XHDR/HDR
INSTALL | 2 +
lib/PublicInbox/Daemon.pm | 3 +
lib/PublicInbox/GitCatFile.pm | 5 +-
lib/PublicInbox/Hval.pm | 9 +--
lib/PublicInbox/Mbox.pm | 11 ++-
lib/PublicInbox/Msgmap.pm | 4 +-
lib/PublicInbox/NNTP.pm | 175 ++++++++++++++++++++----------------------
lib/PublicInbox/NewsGroup.pm | 25 +++---
lib/PublicInbox/Search.pm | 43 ++++++++---
lib/PublicInbox/SearchIdx.pm | 59 ++++++++++----
lib/PublicInbox/SearchMsg.pm | 86 +++++++++++++--------
lib/PublicInbox/SearchView.pm | 19 ++---
public-inbox-nntpd | 19 +++--
t/nntpd.t | 46 ++++++++++-
t/search.t | 2 +-
15 files changed, 305 insertions(+), 203 deletions(-)
^ permalink raw reply [relevance 5%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2015-09-30 21:00 5% [PATCH 0/12] another round of NNTP updates Eric Wong
2015-09-30 21:00 7% ` [PATCH 11/12] t/nntpd.t: simplify condition for response termination Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
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).