unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Pieter Praet <pieter@praet.org>
To: Notmuch Mail <notmuch@notmuchmail.org>
Cc: Austin Clements <amdragon@mit.edu>
Subject: [PATCH 4/4] test: add 'Emacs' prereq to dependent 'emacs-large-search-buffer' tests
Date: Thu,  2 Jun 2011 14:03:40 +0200	[thread overview]
Message-ID: <1307016220-17509-5-git-send-email-pieter@praet.org> (raw)
In-Reply-To: <1307016220-17509-1-git-send-email-pieter@praet.org>

Adds a new test that checks for the presence of 'emacs',
and adds that test as a prereq to all subsequent tests
that rely on Emacs.

This causes tests with unmet dependencies to be skipped.

Signed-off-by: Pieter Praet <pieter@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 c78ce33..063f121 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.
+test_expect_success "prereq: Emacs is present" "which emacs" \
+    && test_set_prereq EMACS
+
+
 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

  parent reply	other threads:[~2011-06-02 12:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-02 12:03 [PATCH 0/4] set test prereqs (Emacs, GDB, GPG) v3 Pieter Praet
2011-06-02 12:03 ` [PATCH 1/4] test: add 'GnuPG' prereq to dependent 'crypto' tests Pieter Praet
2011-06-02 12:03 ` [PATCH 2/4] test: add 'Emacs' " Pieter Praet
2011-06-02 12:03 ` [PATCH 3/4] test: add 'Emacs' prereq to dependent 'emacs' tests Pieter Praet
2011-06-02 12:03 ` Pieter Praet [this message]
2011-06-02 13:32 ` [PATCH 0/4] set test prereqs (Emacs, GDB, GPG) v3 Austin Clements
  -- strict thread matches above, loose matches on Subject: below --
2011-11-01 19:49 set test prereqs (Emacs, GDB, GPG) v4 Pieter Praet
2011-11-01 19:49 ` [PATCH 4/4] test: add 'Emacs' prereq to dependent 'emacs-large-search-buffer' tests Pieter Praet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1307016220-17509-5-git-send-email-pieter@praet.org \
    --to=pieter@praet.org \
    --cc=amdragon@mit.edu \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).