aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Dmitry Kurochkin <dmitry.kurochkin@gmail.com>2012-02-04 11:36:36 +0400
committerGravatar David Bremner <bremner@debian.org>2012-02-04 07:32:54 -0500
commit69adeb52b1c095f570f590e8a8db7f219b875b35 (patch)
treeb39eb7028b24c707b6aded2ea1f193e3982afd73 /test
parentd8d73878815f3038c1a4005e43d35e6b7acf722f (diff)
test: add test for hiding Original Message region at beginning of a message
The test is currently broken and will be fixed by a subsequent patch. The patch adds a new file for tests of Emacs notmuch-show view. Based on patch by David Edmondson [1]. [1] id:"1327562380-12894-4-git-send-email-dme@dme.org"
Diffstat (limited to 'test')
-rwxr-xr-xtest/emacs-show28
-rwxr-xr-xtest/notmuch-test1
2 files changed, 29 insertions, 0 deletions
diff --git a/test/emacs-show b/test/emacs-show
new file mode 100755
index 00000000..98005758
--- /dev/null
+++ b/test/emacs-show
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+
+test_description="Testing emacs notmuch-show view"
+. test-lib.sh
+
+test_begin_subtest "Hiding Original Message region at beginning of a message"
+test_subtest_known_broken
+message_id='OriginalMessageHiding.1@notmuchmail.org'
+add_message \
+ [id]="$message_id" \
+ '[subject]="Hiding Original Message region at beginning of a message"' \
+ '[body]="-----Original Message-----
+Text here."'
+
+cat <<EOF >EXPECTED
+Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox)
+Subject: Hiding Original Message region at beginning of a message
+To: Notmuch Test Suite <test_suite@notmuchmail.org>
+Date: Fri, 05 Jan 2001 15:43:57 +0000
+
+[ 2-line hidden original message. Click/Enter to show. ]
+EOF
+
+test_emacs "(notmuch-show \"id:$message_id\")
+ (test-visible-output)"
+test_expect_equal_file OUTPUT EXPECTED
+
+test_done
diff --git a/test/notmuch-test b/test/notmuch-test
index ced6b478..e14d34e4 100755
--- a/test/notmuch-test
+++ b/test/notmuch-test
@@ -54,6 +54,7 @@ TESTS="
argument-parsing
emacs-test-functions
emacs-address-cleaning
+ emacs-show
"
TESTS=${NOTMUCH_TESTS:=$TESTS}