[Patch v2 1/2] test: add optional workaround for gmime bug.

David Bremner david at tethera.net
Sun Nov 10 19:15:33 PST 2013


A new variable NOTMUCH_TEST_WORKAROUNDS is introduced, which enables this
workaround.  It could be used in the future for similar things.
---
 test/README      | 7 +++++++
 test/test-lib.sh | 9 +++++++++
 2 files changed, 16 insertions(+)

diff --git a/test/README b/test/README
index d12cff2..f132860 100644
--- a/test/README
+++ b/test/README
@@ -96,6 +96,13 @@ Note that some tests in the existing test suite rely on previous test
 items, so you cannot arbitrarily skip any test and expect the
 remaining tests to be unaffected.
 
+Working around some bugs
+------------------------
+
+The test suite contains some workarounds for known (minor) problems in
+external dependencies. You can enable these workarounds by setting the
+environment variable NOTMUCH_TEST_WORKAROUNDS to a non-null value.
+
 Writing Tests
 -------------
 The test script is written as a shell script.  It should start with
diff --git a/test/test-lib.sh b/test/test-lib.sh
index 2aa4dfc..4554d5e 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -628,6 +628,15 @@ notmuch_json_show_sanitize ()
 	-e 's|"filename": "/[^"]*",|"filename": "YYYYY",|g'
 }
 
+notmuch_reply_sanitize ()
+{
+    if test -n "$NOTMUCH_TEST_WORKAROUNDS"; then
+	# work around GMIME bug #711305
+	sed -e 's/^References:  /References: /'
+    else
+	cat
+    fi
+}
 # End of notmuch helper functions
 
 # Use test_set_prereq to tell that a particular prerequisite is available.
-- 
1.8.4.2



More information about the notmuch mailing list