[PATCH] test: Ignore subtly different behaviour of the musl libc

Luis Ressel aranea at aixah.de
Mon Feb 25 18:06:29 PST 2019


---
 test/T030-config.sh       | 6 ++++--
 test/T650-regexp-query.sh | 4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/test/T030-config.sh b/test/T030-config.sh
index f36695c6..9a384f1e 100755
--- a/test/T030-config.sh
+++ b/test/T030-config.sh
@@ -43,7 +43,7 @@ notmuch config set foo.nonexistent
 test_expect_equal "$(notmuch config get foo.nonexistent)" ""
 
 test_begin_subtest "List all items"
-notmuch config list 2>&1 | notmuch_config_sanitize > OUTPUT
+notmuch config list 2>OUTPUT-ERR | notmuch_config_sanitize > OUTPUT
 
 if [ "${NOTMUCH_GMIME_MAJOR}" -lt 3 ]; then
     config_gpg_path="crypto.gpg_path=gpg
@@ -51,7 +51,6 @@ if [ "${NOTMUCH_GMIME_MAJOR}" -lt 3 ]; then
 fi
 
 cat <<EOF > EXPECTED
-Error opening database at MAIL_DIR/.notmuch: No such file or directory
 database.path=MAIL_DIR
 user.name=Notmuch Test Suite
 user.primary_email=test_suite at notmuchmail.org
@@ -68,6 +67,9 @@ built_with.retry_lock=something
 EOF
 test_expect_equal_file EXPECTED OUTPUT
 
+test_begin_subtest "List all items (stderr output)"
+test_expect_equal "$(notmuch_config_sanitize <OUTPUT-ERR)" "Error opening database at MAIL_DIR/.notmuch: No such file or directory"
+
 test_begin_subtest "Top level --config=FILE option"
 cp "${NOTMUCH_CONFIG}" alt-config
 notmuch --config=alt-config config set user.name "Another Name"
diff --git a/test/T650-regexp-query.sh b/test/T650-regexp-query.sh
index 4085340f..9ba3cd64 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 's/^\(A Xapian[^:]*:\).*/\1/' > 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:
 Query string was: from:/unbalanced[/
 EOF
 test_expect_equal_file EXPECTED OUTPUT
-- 
2.19.2



More information about the notmuch mailing list