X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2FT310-emacs.sh;h=ba08167f33eab4c5e475828235eaca7b73df323f;hb=c5356b9ed56e42d36ca18206155b62c94cfbd79d;hp=c8a25de2263498cc2fffb768c3f4ae596f57fc30;hpb=71f04b9a67332782cd021cfe9923fc046c29c3ad;p=notmuch diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh index c8a25de2..ba08167f 100755 --- a/test/T310-emacs.sh +++ b/test/T310-emacs.sh @@ -1,15 +1,15 @@ #!/usr/bin/env bash test_description="emacs interface" -. ./test-lib.sh || exit 1 +. $(dirname "$0")/test-lib.sh || exit 1 -EXPECTED=$TEST_DIRECTORY/emacs.expected-output +EXPECTED=$NOTMUCH_SRCDIR/test/emacs.expected-output add_email_corpus # syntax errors in test-lib.el cause mysterious failures test_begin_subtest "Syntax of emacs test library" -test_expect_success "${TEST_EMACS} -Q --batch --load $TEST_DIRECTORY/test-lib.el" +test_expect_success "${TEST_EMACS} -Q --batch --load $NOTMUCH_SRCDIR/test/test-lib.el" test_begin_subtest "Basic notmuch-hello view in emacs" test_emacs '(notmuch-hello) @@ -401,6 +401,28 @@ Notmuch Test Suite writes: EOF test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest "Reply within emacs to a message with TAB in subject" +test_emacs '(let ((message-hidden-headers ''())) + (notmuch-search "id:1258471718-6781-1-git-send-email-dottedmag@dottedmag.net") + (notmuch-test-wait) + (notmuch-search-show-thread) + (notmuch-test-wait) + (notmuch-show-reply-sender) + (test-output))' +sed -i -e 's/^In-Reply-To: <.*>$/In-Reply-To: /' OUTPUT +sed -i -e 's/^References: <.*>$/References: /' OUTPUT +sed -i -e '/^--text follows this line--$/q' OUTPUT +cat <EXPECTED +From: Notmuch Test Suite +To: Mikhail Gusarov +Subject: Re: [notmuch] [PATCH 1/2] Close message file after parsing message headers +In-Reply-To: +Fcc: ${MAIL_DIR}/sent +References: +--text follows this line-- +EOF +test_expect_equal_file EXPECTED OUTPUT + test_begin_subtest "Reply from alternate address within emacs" add_message '[from]="Sender "' \ [to]=test_suite_other@notmuchmail.org @@ -1015,7 +1037,7 @@ YYY/notmuch_fail exited with status 1 (see *Notmuch errors* for more details) === ERROR === [XXX] YYY/notmuch_fail exited with status 1 -command: YYY/notmuch_fail search --format\=sexp --format-version\=3 --sort\=newest-first tag\:inbox +command: YYY/notmuch_fail search --format\=sexp --format-version\=4 --sort\=newest-first tag\:inbox exit status: 1" test_begin_subtest "Search handles subprocess warnings"