[PATCH 4/4] test: add 'Emacs' prereq to 'emacs-large-search-buffer' tests
Pieter Praet
pieter at praet.org
Fri May 13 01:17:16 PDT 2011
Signed-off-by: Pieter Praet <pieter at praet.org>
---
test/emacs-large-search-buffer | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/test/emacs-large-search-buffer b/test/emacs-large-search-buffer
index 2751a32..54b1827 100755
--- a/test/emacs-large-search-buffer
+++ b/test/emacs-large-search-buffer
@@ -2,6 +2,11 @@
test_description="Emacs with large search results buffer"
. test-lib.sh
+# Emacs is a prereq.
+if test_expect_success "prereq: Emacs is present" "which emacs"; then
+ test_set_prereq EMACS
+fi
+
x=xxxxxxxxxx # 10
x=$x$x$x$x$x$x$x$x$x$x # 100
x=$x$x$x$x$x$x$x$x$x # 900
@@ -23,11 +28,11 @@ expected="$(notmuch search '*' | sed -e 's/^thread:[0-9a-f]* //' -e 's/;//' -e
End of search results."
output=$(test_emacs '(notmuch-search "*") (notmuch-test-wait) (princ (buffer-string))' | sed -e s', *, ,g' -e 's/xxx*/[BLOB]/g')
-test_expect_equal "$output" "$expected"
+test_expect_equal EMACS "$output" "$expected"
test_begin_subtest "Ensure that emacs doesn't drop error messages"
output=$(test_emacs '(notmuch-search "--this-option-does-not-exist") (notmuch-test-wait) (princ (buffer-string))')
-test_expect_equal "$output" "Error: Unexpected output from notmuch search:
+test_expect_equal EMACS "$output" "Error: Unexpected output from notmuch search:
Unrecognized option: --this-option-does-not-exist
End of search results. (process returned 1)"
--
1.7.4.1
More information about the notmuch
mailing list