* [PATCH 1/7] nntp: fix XOVER command
2015-09-24 3:37 7% [PATCH 0/7] another round of NNTP updates Eric Wong
@ 2015-09-24 3:37 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2015-09-24 3:37 UTC (permalink / raw)
To: meta
Oops, we need to test commands more closely :x
Add a missing prototype while we're at it for extra
checking.
---
lib/PublicInbox/NNTP.pm | 4 ++--
t/nntpd.t | 9 ++++++++-
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm
index 6dc0db3..0d0de97 100644
--- a/lib/PublicInbox/NNTP.pm
+++ b/lib/PublicInbox/NNTP.pm
@@ -762,11 +762,11 @@ sub cmd_xrover ($;$) {
});
}
-sub over_line {
+sub over_line ($$) {
my ($self, $r) = @_;
more($self, join("\t", $r->[0], map {
- my $h = xhdr($r, $_);
+ my $h = hdr_val($r, $_);
defined $h ? $h : '';
} @OVERVIEW ));
}
diff --git a/t/nntpd.t b/t/nntpd.t
index 04444e4..ea2c3df 100644
--- a/t/nntpd.t
+++ b/t/nntpd.t
@@ -144,7 +144,14 @@ EOF
}
}
- # TODO: upgrades and such
+ is_deeply($n->xover('1-'), {
+ '1' => ['hihi',
+ 'Me <me@example.com>',
+ 'Thu, 01 Jan 1970 06:06:06 +0000',
+ '<nntp@example.com>',
+ '',
+ '202',
+ '1' ] }, "XOVER works");
ok(kill('TERM', $pid), 'killed nntpd');
$pid = undef;
--
EW
^ permalink raw reply related [relevance 7%]
* [PATCH 0/7] another round of NNTP updates
@ 2015-09-24 3:37 7% Eric Wong
2015-09-24 3:37 7% ` [PATCH 1/7] nntp: fix XOVER command Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2015-09-24 3:37 UTC (permalink / raw)
To: meta
We'll still need better tests, but most of this seems to
work alright. Must. Fix. XOVER. Performance. Next!
Eric Wong (7):
nntp: fix XOVER command
nntpd: additional daemonization options
nntpd: hard quit after 30s
nntpd: move busy check to NNTP package
nntp: avoid infinite loop on partial read
nntpd: better encapsulation for shutdown
nntpd: support SIGUSR2 in single-process mode, too
lib/PublicInbox/NNTP.pm | 21 +++++----
public-inbox-nntpd | 118 +++++++++++++++++++++++++++++++++++++++++++-----
t/nntpd.t | 9 +++-
3 files changed, 126 insertions(+), 22 deletions(-)
^ permalink raw reply [relevance 7%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2015-09-24 3:37 7% [PATCH 0/7] another round of NNTP updates Eric Wong
2015-09-24 3:37 7% ` [PATCH 1/7] nntp: fix XOVER command 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).