aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/emacs
diff options
context:
space:
mode:
authorGravatar Mark Anderson <ma.skies@gmail.com>2011-06-28 16:11:32 -0600
committerGravatar Carl Worth <cworth@cworth.org>2011-06-28 16:01:56 -0700
commiteb4cf465a5c179c711c15649fc90c7377850cb77 (patch)
treeccc18f56b2bab21f6f6eda0af9282aa854e2d2db /test/emacs
parent273d896097830235eca5f1bc87ac03e381280f1c (diff)
test:Improve test behaviors when --root is used
Change add_email_corpus, emacs_deliver_message and tests to use $TEST_DIRECTORY instead of '..'. This improves the behavior of the usage of --root=<dir>, as the assumption of what '..' means will usually be incorrect. Document -root option in README and update valgrind to work with -root.
Diffstat (limited to 'test/emacs')
-rwxr-xr-xtest/emacs4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/emacs b/test/emacs
index 3d426453..3034a5a6 100755
--- a/test/emacs
+++ b/test/emacs
@@ -8,7 +8,7 @@
test_description="emacs interface"
. test-lib.sh
-EXPECTED=../emacs.expected-output
+EXPECTED=$TEST_DIRECTORY/emacs.expected-output
add_email_corpus
@@ -123,13 +123,13 @@ test_emacs '(notmuch-search "id:\"123..456@example\"")
output=$(notmuch search 'id:"123..456@example"' | notmuch_search_sanitize)
test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Message with .. in Message-Id (inbox search-add show-add)"
-test_begin_subtest "Sending a message via (fake) SMTP"
emacs_deliver_message \
'Testing message sent via SMTP' \
'This is a test that messages are sent via SMTP' \
'(message-goto-to)
(kill-whole-line)
(insert "To: user@example.com\n")'
+
sed \
-e s',^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' \
-e s',^Message-ID: <.*>$,Message-ID: <XXX>,' < sent_message >OUTPUT