diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2010-01-18 11:54:33 -0500 |
---|---|---|
committer | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2010-01-18 11:58:03 -0500 |
commit | 5447172bbbf2b5ec662f24a8582199123c44d100 (patch) | |
tree | 4e5a59ba88b592114a0e4e7c8321654f3c12f59e /tests | |
parent | ef41243e3947608568579fde82bef1f5c74bda47 (diff) |
simplified test to cope with possibility of re-ordered keytrans listfprs output
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/keytrans | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/tests/keytrans b/tests/keytrans index 62aa4f2..411b42e 100755 --- a/tests/keytrans +++ b/tests/keytrans @@ -180,8 +180,6 @@ NEWKEYID=$( printf "%s" "$NEWKEYFPR" | cut -b25-40) PEM2OPENPGP_TIMESTAMP="$timestamp" \ keytrans adduserid "$KEYID" "baz" | gpg --import -gpg --check-sigs --with-colons --fixed-list-mode - cat >"$TEMPDIR"/expectedout <<EOF pub:u:1024:1:$KEYID:$timestamp:::u:::scSC: uid:u::::$timestamp::E90EC72E68C6C2A0751DADC70F54F60D27B88C3D::monkeymonkey: @@ -199,21 +197,13 @@ 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 +sort >"$TEMPDIR"/expectedout <<EOF $KEYFPR $NEWKEYFPR EOF 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 +diff -u "$TEMPDIR"/expectedout <( < "$TEMPDIR"/secring.gpg keytrans listfprs | sort ) ## FIXME: addtest: not testing subkeys at the moment. |