[PATCH] test: emacs: tidy up "Stashing in notmuch-show" test
Pieter Praet
pieter at praet.org
Wed Nov 16 03:38:19 PST 2011
Merge expected output into the actual test, so we can verify the stashed
filename using ${gen_msg_filename} instead of doing sed tricks.
---
Thanks David!
Here's a small update that was hanging out on one of my local branches.
Peace
test/emacs | 14 ++++++++++++--
test/emacs.expected-output/emacs-stashing | 9 ---------
2 files changed, 12 insertions(+), 11 deletions(-)
delete mode 100644 test/emacs.expected-output/emacs-stashing
diff --git a/test/emacs b/test/emacs
index 75a0a74..3bf2e29 100755
--- a/test/emacs
+++ b/test/emacs
@@ -369,8 +369,18 @@ test_emacs '(notmuch-show "id:\"bought\"")
(rotate-yank-pointer 1))
(reverse-region (point-min) (point-max))
(test-output)'
-sed -i -e 's/^.*tmp.emacs\/mail.*$/FILENAME/' OUTPUT
-test_expect_equal_file OUTPUT $EXPECTED/emacs-stashing
+cat <<EOF >EXPECTED
+Sat, 01 Jan 2000 12:00:00 -0000
+Some One <someone at somewhere.org>
+Some One Else <notsomeone at somewhere.org>
+Notmuch <notmuch at 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_emacs '(notmuch-search "id:\"bought\"")
diff --git a/test/emacs.expected-output/emacs-stashing b/test/emacs.expected-output/emacs-stashing
deleted file mode 100644
index 4923594..0000000
--- a/test/emacs.expected-output/emacs-stashing
+++ /dev/null
@@ -1,9 +0,0 @@
-Sat, 01 Jan 2000 12:00:00 -0000
-Some One <someone at somewhere.org>
-Some One Else <notsomeone at somewhere.org>
-Notmuch <notmuch at notmuchmail.org>
-Stash my stashables
-id:"bought"
-bought
-inbox,stashtest
-FILENAME
--
1.7.7.1
More information about the notmuch
mailing list