]> git.notmuchmail.org Git - notmuch/commitdiff
test: add known broken test exit code of notmuch show
authorDavid Bremner <david@tethera.net>
Thu, 23 Jan 2014 12:23:59 +0000 (08:23 -0400)
committerDavid Bremner <david@tethera.net>
Sat, 25 Jan 2014 00:19:50 +0000 (20:19 -0400)
This test catches a segfault on a syntactically invalid query. It also
catches a problem with my initial fix, which still returned 0.

test/T520-show.sh [new file with mode: 0755]

diff --git a/test/T520-show.sh b/test/T520-show.sh
new file mode 100755 (executable)
index 0000000..bdd9d71
--- /dev/null
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+test_description='"notmuch show"'
+
+. ./test-lib.sh
+
+add_email_corpus
+
+test_begin_subtest "exit code for show invalid query"
+test_subtest_known_broken
+notmuch show foo..
+exit_code=$?
+test_expect_equal 1 $exit_code
+
+test_done