diff options
author | Jameson Rollins <jrollins@finestructure.net> | 2010-01-18 10:53:27 -0500 |
---|---|---|
committer | Jameson Rollins <jrollins@finestructure.net> | 2010-01-18 10:53:27 -0500 |
commit | d6a9bf7fb5c3811db1cec6ee954515c318057f49 (patch) | |
tree | 1bd229f0be527247b197d020fece54d3885397e0 /tests | |
parent | 3bc5bbd31901a9b93f13e75b162f6a21688f30be (diff) |
fix keytrans test to handle possible permuted output of keytrans listfprs from expected order
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/keytrans | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/keytrans b/tests/keytrans index e70751d..62aa4f2 100755 --- a/tests/keytrans +++ b/tests/keytrans @@ -196,6 +196,7 @@ uid:-::::$(($timestamp + 1))::A0D708F51CC257DEFC01AEDE1E0A5F329DFD8F16::fubar: sig:!::1:$NEWKEYID:$(($timestamp + 1))::::fubar:13x: EOF +echo "test: diff expected gpg list output" diff -u "$TEMPDIR"/expectedout <(gpg --check-sigs --with-colons --fixed-list-mode | grep -v ^tru) cat >"$TEMPDIR"/expectedout <<EOF @@ -203,7 +204,16 @@ $KEYFPR $NEWKEYFPR EOF -diff -u "$TEMPDIR"/expectedout <( < "$TEMPDIR"/secring.gpg keytrans listfprs) +echo "test: diff expected keytrans listfpr output" +if ! diff -u "$TEMPDIR"/expectedout <( < "$TEMPDIR"/secring.gpg keytrans listfprs) ; then + # test reverse order + echo "test: diff test again with permuted order" + cat >"$TEMPDIR"/expectedout <<EOF +$NEWKEYFPR +$KEYFPR +EOF + diff -u "$TEMPDIR"/expectedout <( < "$TEMPDIR"/secring.gpg keytrans listfprs) +fi ## FIXME: addtest: not testing subkeys at the moment. |