Don't modify headers while --testing if -o is set.

Signed-off-by: Thomas Hochstein <thh@thh.name>
This commit is contained in:
Thomas Hochstein 2026-01-24 18:25:31 +01:00
parent 9177618643
commit 6b73bdfdd3
2 changed files with 5 additions and 5 deletions

View file

@ -475,7 +475,7 @@ sub BuildPosting {
$_ =~ s/\%p/$$/g;
$_ =~ s/\%t/$TimeStamp/g;
# add random part in test mode
if ($OptTest) {
if ($OptTest && !$OptOutput) {
my $random = sprintf("%08X", rand(0xFFFFFFFF));
$_ =~ s/</<test-$random-/;
}
@ -491,7 +491,7 @@ sub BuildPosting {
}
# add Supersedes: if set
if (/^Supersedes: /) {
if ($LastMID && !$OptTest) {
if ($LastMID && (!$OptTest or $OptOutput)) {
$_= "Supersedes: $LastMID\n";
} else {
$_ = '';
@ -868,8 +868,8 @@ Can be combined with B<--project> to show if just one project is due.
=item B<-t>, B<--test>
Test mode. Don't update project status (time and Message-ID of last
posting), dont' add a I<Supersedes:> header and modify the
I<Message-ID:> with a random part.
posting); if project is posted to Usenet, dont' add a I<Supersedes:>
header and modify the I<Message-ID:> with a random part.
The text(s) will still be posted if due or forced by B<--force>.