Module Name:    src
Committed By:   lukem
Date:           Thu Jun 11 02:55:35 UTC 2009

Modified Files:
        src/crypto/external/bsd/netpgp/dist/tests: verify.at

Log Message:
Use grep to search for specific error messages rather than expecting
the entire command stderr to never change.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/crypto/external/bsd/netpgp/dist/tests/verify.at

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/tests/verify.at
diff -u src/crypto/external/bsd/netpgp/dist/tests/verify.at:1.8 src/crypto/external/bsd/netpgp/dist/tests/verify.at:1.9
--- src/crypto/external/bsd/netpgp/dist/tests/verify.at:1.8	Thu Jun 11 02:36:38 2009
+++ src/crypto/external/bsd/netpgp/dist/tests/verify.at	Thu Jun 11 02:55:35 2009
@@ -1,4 +1,4 @@
-# $NetBSD: verify.at,v 1.8 2009/06/11 02:36:38 lukem Exp $
+# $NetBSD: verify.at,v 1.9 2009/06/11 02:55:35 lukem Exp $
 
 AT_SETUP([simple signature and verification])
 
@@ -13,19 +13,16 @@
     [0], [ignore], [ignore])
 
 # Fail to verify an unsigned file
-# XXX: determine how to expand $testuserid instead of hard-coding
 AT_CHECK([netpgp --homedir $testhomedir --verify file1],
-    [1], [ignore],
-[netpgp: default key set to "C7AB5F325F918728"
-"file1": No signatures found - is this a signed file?
-])
+    [1], [ignore], [stderr])
+AT_CHECK([grep 'No signatures found - is this a signed file?' stderr],
+    [0], [ignore], [ignore])
 
-# XXXTODO: deliberately corrupt file2.gpg and attempt to verify
+# Deliberately corrupt file2.gpg and attempt to verify
 sed -e 's|1|2|' file1.gpg > file2.gpg
 AT_CHECK([netpgp --homedir $testhomedir --verify file2.gpg],
-    [1], [ignore],
-[netpgp: default key set to "C7AB5F325F918728"
-"file2.gpg": verification failure: 1 invalid signatures, 0 unknown signatures
-])
+    [1], [ignore], [stderr])
+AT_CHECK([grep 'verification failure: 1 invalid signature' stderr],
+    [0], [ignore], [ignore])
 
 AT_CLEANUP

Reply via email to