X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2Ftest-lib.sh;h=6fe335b588996c1dc6af4d96fbe4a03c43ac0c85;hb=12534d5c4b02498173b0c63d063ae0a3c845b957;hp=126911fb385aacb7aa087ab9c7c099419c7641fd;hpb=33c8777a967ece2dd4bbda7e83a4e07c195abf51;p=notmuch diff --git a/test/test-lib.sh b/test/test-lib.sh index 126911fb..6fe335b5 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -82,6 +82,9 @@ unset CDPATH unset GREP_OPTIONS +# For emacsclient +unset ALTERNATE_EDITOR + # Convenience # # A regexp to match 5 and 40 hexdigits @@ -675,9 +678,14 @@ notmuch_search_sanitize () perl -pe 's/("?thread"?: ?)("?)................("?)/\1\2XXX\3/' } -notmuch_search_files_sanitize() +notmuch_search_files_sanitize () +{ + notmuch_dir_sanitize +} + +notmuch_dir_sanitize () { - sed -e "s,$MAIL_DIR,MAIL_DIR," + sed -e "s,$MAIL_DIR,MAIL_DIR," -e "s,${PWD},CWD,g" "$@" } NOTMUCH_SHOW_FILENAME_SQUELCH='s,filename:.*/mail,filename:/XXX/mail,' @@ -1177,7 +1185,7 @@ test_C () { echo "== stdout ==" > OUTPUT.stdout echo "== stderr ==" > OUTPUT.stderr ./${exec_file} "$@" 1>>OUTPUT.stdout 2>>OUTPUT.stderr - sed "s,${PWD},CWD,g" OUTPUT.stdout OUTPUT.stderr > OUTPUT + notmuch_dir_sanitize OUTPUT.stdout OUTPUT.stderr > OUTPUT }