aboutsummaryrefslogtreecommitdiff
path: root/test/T650-regexp-query.sh
diff options
context:
space:
mode:
authorLuis Ressel <aranea@aixah.de>2019-03-11 18:14:49 +0100
committerDavid Bremner <david@tethera.net>2019-03-11 22:24:55 -0300
commit9f7e851263b96acacc9ea542e9f5d837563fea05 (patch)
treef23cc706248815e67aaf75e3a4759fbff7be22d5 /test/T650-regexp-query.sh
parenta1e649276e181bbb2f14594628333d4337e3fc7c (diff)
Prepend regerror() messages with "regexp error: "
The exact error messages returned by regerror() aren't standardized; relying on them isn't portable. Thus, add a a prefix to make clear that the subsequent message is a regexp parsing error, and only look for this prefix in the test suite, ignoring the rest of the message.
Diffstat (limited to 'test/T650-regexp-query.sh')
-rwxr-xr-xtest/T650-regexp-query.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/T650-regexp-query.sh b/test/T650-regexp-query.sh
index 4085340f..31b3d036 100755
--- a/test/T650-regexp-query.sh
+++ b/test/T650-regexp-query.sh
@@ -137,10 +137,10 @@ EOF
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "regexp error reporting"
-notmuch search 'from:/unbalanced[/' 1>OUTPUT 2>&1
+notmuch search 'from:/unbalanced[/' 2>&1 | sed -e '/^A Xapian/ s/[^:]*$//' > OUTPUT
cat <<EOF > EXPECTED
notmuch search: A Xapian exception occurred
-A Xapian exception occurred parsing query: Invalid regular expression
+A Xapian exception occurred parsing query: Regexp error:
Query string was: from:/unbalanced[/
EOF
test_expect_equal_file EXPECTED OUTPUT