From 531d853730a93e78b0839d2a1a1a2b6832d8ed61 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Sun, 5 Oct 2003 22:55:03 +0000 Subject: [PATCH] Add checking of a wire-formatted control message. --- tests/run-tests | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/run-tests b/tests/run-tests index a3edd55..7e8d6b5 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -127,6 +127,26 @@ if (pgpverify ('../sample.control', 'news.announce.newgroups')) { } $tests++; +# Convert sample.control to wire format and then check its signature. +open (SAMPLE, '../sample.control') + or die "Can't open ../sample.control: $!\n"; +open (WIRE, '> signed') or die "Can't create signed: $!\n"; +while () { + s/\n\z/\r\n/; + s/^\./../; + print WIRE; +} +print WIRE ".\r\n"; +close SAMPLE; +close WIRE; +if (pgpverify ('signed', 'news.announce.newgroups')) { + print "PASS: pgpverify-wire\n"; +} else { + print "FAIL: pgpverify-wire\n"; + $failed++; +} +$tests++; + # Sign a message with signcontrol. fix_signcontrol ($pgp); my $status = system ('./signcontrol < ./messages/newgroup > signed');