]> git.notmuchmail.org Git - notmuch/blobdiff - test/test-lib.sh
test: move GNUPGHOME to TEST_TMPDIR
[notmuch] / test / test-lib.sh
index e7b83392f168c71ca7cb62ca19fb4ac30df1a0ba..518d9c7fdb001b1a807182f068dae1cc2bb86b8a 100644 (file)
@@ -270,6 +270,8 @@ die () {
 GIT_EXIT_OK=
 # Note: TEST_TMPDIR *NOT* exported!
 TEST_TMPDIR=$(mktemp -d "${TMPDIR:-/tmp}/notmuch-test-$$.XXXXXX")
+# Put GNUPGHOME in TMPDIR to avoid problems with long paths.
+export GNUPGHOME="${TEST_TMPDIR}/gnupg"
 trap 'trap_exit' EXIT
 trap 'trap_signal' HUP INT TERM
 
@@ -736,7 +738,8 @@ notmuch_json_show_sanitize ()
        -e 's|"Date": "Fri, 05 Jan 2001 [^"]*0000"|"Date": "GENERATED_DATE"|g' \
        -e 's|"filename": "signature.asc",||g' \
        -e 's|"filename": "/[^"]*",|"filename": "YYYYY",|g' \
-       -e 's|"timestamp": 97.......|"timestamp": 42|g'
+       -e 's|"timestamp": 97.......|"timestamp": 42|g' \
+        -e 's|"content-length": [1-9][0-9]*|"content-length": "NONZERO"|g'
 }
 
 notmuch_emacs_error_sanitize ()