aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2017-12-08 22:19:06 -0400
committerDavid Bremner <david@tethera.net>2017-12-08 22:19:06 -0400
commit040c3236afcf95bead0324a48c2e0b9cd7934993 (patch)
tree9732f633b47cc71797f966c9ac4113b1ebac7801 /test
parentbe555b9d27f5675ef04edc5a34a4dc2b6dfc71ff (diff)
parentae55a86639f86ad1b547e961f71b1bde2180752d (diff)
Merge branch 'release'
Conflicts: NEWS Add in NEWS from point release
Diffstat (limited to 'test')
-rwxr-xr-xtest/T355-smime.sh8
-rwxr-xr-xtest/T450-emacs-show.sh9
2 files changed, 16 insertions, 1 deletions
diff --git a/test/T355-smime.sh b/test/T355-smime.sh
index 1523f17b..be45e3b1 100755
--- a/test/T355-smime.sh
+++ b/test/T355-smime.sh
@@ -48,6 +48,12 @@ EOF
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "signature verification (notmuch CLI)"
+if [ "${NOTMUCH_GMIME_MAJOR}" -lt 3 ]; then
+ # gmime 2 can't report User IDs properly for S/MIME
+ USERID=''
+else
+ USERID='"userid": "CN=Notmuch Test Suite",'
+fi
output=$(notmuch show --format=json --verify subject:"test signed message 001" \
| notmuch_json_show_sanitize \
| sed -e 's|"created": [-1234567890]*|"created": 946728000|' \
@@ -65,7 +71,7 @@ expected='[[[{"id": "XXXXX",
"Date": "Sat, 01 Jan 2000 12:00:00 +0000"},
"body": [{"id": 1,
"sigstatus": [{"fingerprint": "'$FINGERPRINT'",
- "status": "good",
+ "status": "good",'$USERID'
"expires": 424242424,
"created": 946728000}],
"content-type": "multipart/signed",
diff --git a/test/T450-emacs-show.sh b/test/T450-emacs-show.sh
index d6aa5b41..8db0e49b 100755
--- a/test/T450-emacs-show.sh
+++ b/test/T450-emacs-show.sh
@@ -198,5 +198,14 @@ This is an error
stdout:
This is output"
+test_begin_subtest "text/enriched exploit mitigation"
+add_message '[content-type]="text/enriched"
+ [body]="
+<x-display><param>(when (progn (read-only-mode -1) (insert ?p ?0 ?w ?n ?e ?d)) nil)</param>test</x-display>
+"'
+test_emacs '(notmuch-show "id:'$gen_msg_id'")
+ (test-visible-output "OUTPUT.raw")'
+output=$(head -1 OUTPUT.raw|cut -f1-4 -d' ')
+test_expect_equal "$output" "Notmuch Test Suite <test_suite@notmuchmail.org>"
test_done