test: emacs: tidy up "Stashing in notmuch-show" test

Merge expected output into the actual test, so we can verify the stashed
filename using ${gen_msg_filename} instead of doing sed tricks.
This commit is contained in:
Pieter Praet 2011-11-16 12:38:19 +01:00 committed by David Bremner
parent c832dad322
commit 66247d26f3
2 changed files with 12 additions and 11 deletions

View file

@ -369,8 +369,18 @@ test_emacs '(notmuch-show "id:\"bought\"")
(rotate-yank-pointer 1)) (rotate-yank-pointer 1))
(reverse-region (point-min) (point-max)) (reverse-region (point-min) (point-max))
(test-output)' (test-output)'
sed -i -e 's/^.*tmp.emacs\/mail.*$/FILENAME/' OUTPUT cat <<EOF >EXPECTED
test_expect_equal_file OUTPUT $EXPECTED/emacs-stashing Sat, 01 Jan 2000 12:00:00 -0000
Some One <someone@somewhere.org>
Some One Else <notsomeone@somewhere.org>
Notmuch <notmuch@notmuchmail.org>
Stash my stashables
id:"bought"
bought
inbox,stashtest
${gen_msg_filename}
EOF
test_expect_equal_file OUTPUT EXPECTED
test_begin_subtest "Stashing in notmuch-search" test_begin_subtest "Stashing in notmuch-search"
test_emacs '(notmuch-search "id:\"bought\"") test_emacs '(notmuch-search "id:\"bought\"")

View file

@ -1,9 +0,0 @@
Sat, 01 Jan 2000 12:00:00 -0000
Some One <someone@somewhere.org>
Some One Else <notsomeone@somewhere.org>
Notmuch <notmuch@notmuchmail.org>
Stash my stashables
id:"bought"
bought
inbox,stashtest
FILENAME