From b8c41362f2a5c8fcc6b1846a79c72bfa77565297 Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Tue, 3 Apr 2018 11:09:12 +0000 Subject: nntp: simplify the long_response API We we worked around the default range/termination conditions of long_response in many cases to reduce calls to SQLite or Xapian. So continue that trend and become more like the PSGI API which doesn't force callers to specify an article range or work inside a loop. --- t/v2writable.t | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 't/v2writable.t') diff --git a/t/v2writable.t b/t/v2writable.t index 62947351..2f839776 100644 --- a/t/v2writable.t +++ b/t/v2writable.t @@ -105,6 +105,7 @@ if ('ensure git configs are correct') { { $mime->header_set('Message-Id', '', ''); + $mime->header_set('References', ''); ok($im->add($mime), 'message with multiple Message-ID'); $im->done; my @found; @@ -196,6 +197,15 @@ EOF } is_deeply([sort keys %lg], [sort keys %$x], 'XOVER and LISTGROUPS return the same article numbers'); + + my $xref = $n->xhdr('Xref', '1-'); + is_deeply([sort keys %lg], [sort keys %$xref], 'Xref range OK'); + + my $mids = $n->xhdr('Message-ID', '1-'); + is_deeply([sort keys %lg], [sort keys %$xref], 'Message-ID range OK'); + + my $rover = $n->xrover('1-'); + is_deeply([sort keys %lg], [sort keys %$rover], 'XROVER range OK'); }; { local $ENV{NPROC} = 2; -- cgit v1.2.3-24-ge0c7