From fbfd63996ddfc9a23b8a1e0f8756e378f2e196ba Mon Sep 17 00:00:00 2001 From: Jonathan Corbet Date: Sat, 13 Oct 2018 15:42:21 -0600 Subject: Add Xrefs to over/xover lines Putting the Xref field into xover lines allows newsreaders to mark cross-posted messages read when catching up a group. That, in turn, massively improves the life of crazy people who try to follow dozens of kernel lists, where emails are often heavily cross-posted. --- t/nntpd.t | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 't/nntpd.t') diff --git a/t/nntpd.t b/t/nntpd.t index f8599080..9c1d0762 100644 --- a/t/nntpd.t +++ b/t/nntpd.t @@ -196,7 +196,9 @@ EOF '', '', $len, - '1' ] }, "XOVER range works"); + '1', + 'Xref: '. hostname . ' test-nntpd:1'] }, + "XOVER range works"); is_deeply($n->xover('1'), { '1' => ["Testing for El\xc3\xa9anor", @@ -205,7 +207,9 @@ EOF '', '', $len, - '1' ] }, "XOVER by article works"); + '1', + 'Xref: '. hostname . ' test-nntpd:1'] }, + "XOVER by article works"); is_deeply($n->head(1), $n->head(''), 'HEAD OK'); is_deeply($n->body(1), $n->body(''), 'BODY OK'); @@ -225,7 +229,8 @@ EOF is($r[1], "0\tTesting for El\xc3\xa9anor\t" . "El\xc3\xa9anor \t" . "Thu, 01 Jan 1970 06:06:06 +0000\t" . - "$mid\t\t$len\t1", + "$mid\t\t$len\t1" . + "\tXref: " . hostname . " test-nntpd:0", 'OVER by Message-ID works'); is($r[2], '.', 'correctly terminated response'); } -- cgit v1.2.3-24-ge0c7