X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=tests%2Fkeytrans;h=411b42ec2b0c5cdc883a5530eb1f3d15c7c449e8;hb=HEAD;hp=b73d42276e0f76c53fc7be1d8716ca4230e3dfcb;hpb=7a4210adaf12ad3c5023281d87e2ca018f5d68ed;p=monkeysphere.git diff --git a/tests/keytrans b/tests/keytrans index b73d422..411b42e 100755 --- a/tests/keytrans +++ b/tests/keytrans @@ -106,8 +106,8 @@ diff -u \ <(hd "$TEMPDIR"/secret.key) \ <(hd "$TEMPDIR"/converted.secret.key) - -KEYID=$(gpg --fingerprint --with-colons --list-keys | grep ^fpr | cut -f10 -d: | cut -b25-40) +KEYFPR=$(gpg --fingerprint --with-colons --list-keys | grep ^fpr | cut -f10 -d:) +KEYID=$(printf "%s" "$KEYFPR" | cut -b25-40) echo "conversions look good!" @@ -127,7 +127,7 @@ PEM2OPENPGP_TIMESTAMP="$timestamp" \ gpg --check-trustdb gpg --list-keys -cat >expectedout <"$TEMPDIR"/expectedout <expectedout <"$TEMPDIR"/expectedout < "$TEMPDIR"/newkey.gpg + +NEWKEYFPR=$(< "$TEMPDIR"/newkey.gpg keytrans listfprs) +NEWKEYID=$( printf "%s" "$NEWKEYFPR" | cut -b25-40) + +< "$TEMPDIR"/newkey.gpg gpg --import + +< "$TEMPDIR"/secring.gpg \ +PEM2OPENPGP_TIMESTAMP="$timestamp" \ + keytrans adduserid "$KEYID" "baz" | gpg --import + +cat >"$TEMPDIR"/expectedout <"$TEMPDIR"/expectedout <