enforce --no-armor when exporting to openpgp2ssh in case weird gpg.conf options ...
[monkeysphere.git] / tests / keytrans
index e70751d99a5f6eaca6c3d7cbd36c65b868ab5fbe..411b42ec2b0c5cdc883a5530eb1f3d15c7c449e8 100755 (executable)
@@ -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:
@@ -196,14 +194,16 @@ 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
+sort >"$TEMPDIR"/expectedout <<EOF
 $KEYFPR
 $NEWKEYFPR
 EOF
 
-diff -u "$TEMPDIR"/expectedout <( < "$TEMPDIR"/secring.gpg keytrans listfprs)
+echo "test: diff expected keytrans listfpr output"
+diff -u "$TEMPDIR"/expectedout <( < "$TEMPDIR"/secring.gpg keytrans listfprs | sort )
 
 ## FIXME: addtest: not testing subkeys at the moment.