A new variable NOTMUCH_TEST_SLOPPY 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..eb1a2e6 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_SLOPPY 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..c71bd4e 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_SLOPPY"; 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

Reply via email to