Comments
Patch
@@ -7,10 +7,21 @@
test_description='PGP/MIME signature verification and decryption'
. ./test-lib.sh
+# Emacs is a prereq.
+test_expect_success "prereq: Emacs is present" "which emacs" \
+ && test_set_prereq EMACS
+
# GnuPG is a prereq.
test_expect_success "prereq: GnuPG is present" "which gpg" \
&& test_set_prereq GPG
+# Some tests have multiple prereqs, but the test_expect_* functions
+# accept only a single argument as prereq tag, and using test_have_prereq
+# in and around tests causes various errors for me, so a dirty workaround
+# will have to do for the time being.
+test_have_prereq EMACS && test_have_prereq GPG \
+ && test_set_prereq EMACS+GPG
+
add_gnupg_home ()
{
@@ -36,7 +47,7 @@ FINGERPRINT=$(gpg --no-tty --list-secret-keys --with-colons --fingerprint | grep
# although I can't figure out why
add_email_corpus
-test_expect_success GPG 'emacs delivery of signed message' \
+test_expect_success EMACS+GPG 'emacs delivery of signed message' \
'emacs_deliver_message \
"test signed message 001" \
"This is a test signed message." \
@@ -146,7 +157,7 @@ mv "${GNUPGHOME}"{.bak,}
cat <<EOF >TESTATTACHMENT
This is a test file.
EOF
-test_expect_success GPG 'emacs delivery of encrypted message with attachment' \
+test_expect_success EMACS+GPG 'emacs delivery of encrypted message with attachment' \
'emacs_deliver_message \
"test encrypted message 001" \
"This is a test encrypted message.\n" \
@@ -268,7 +279,7 @@ test_expect_equal GPG \
"$expected"
mv "${GNUPGHOME}"{.bak,}
-test_expect_success GPG 'emacs delivery of encrypted + signed message' \
+test_expect_success EMACS+GPG 'emacs delivery of encrypted + signed message' \
'emacs_deliver_message \
"test encrypted message 002" \
"This is another test encrypted message.\n" \