X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2Ftest-lib.sh;h=cc20f414b6e670a2ae788dae7a810e27d0b97e0d;hb=8bb6f7869c4c98190f010d60409938b1c50c5968;hp=922b1ef536350fb91ba5988fdde991e1fdf7d79a;hpb=627d752501b42326b9016271de33a6cb0fa2dc8c;p=notmuch diff --git a/test/test-lib.sh b/test/test-lib.sh index 922b1ef5..cc20f414 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -424,7 +424,7 @@ test_begin_subtest () error "bug in test script: Missing test_expect_equal in ${BASH_SOURCE[1]}:${BASH_LINENO[0]}" fi test_subtest_name="$1" - # Remember stdout and stderr file descriptios and redirect test + # Remember stdout and stderr file descriptors and redirect test # output to the previously prepared file descriptors 3 and 4 (see # below) if test "$verbose" != "t"; then exec 4>test.output 3>&4; fi @@ -477,8 +477,8 @@ test_expect_equal_file () test_ok_ "$test_subtest_name" else testname=$this_test.$test_count - mv "$output" $testname.output - mv "$expected" $testname.expected + cp "$output" $testname.output + cp "$expected" $testname.expected test_failure_ "$test_subtest_name" "$(diff -u $testname.expected $testname.output)" fi fi @@ -973,6 +973,13 @@ rm -fr "$test" || { exit 1 } +# A temporary home directory is needed by at least: +# - emacs/"Sending a message via (fake) SMTP" +# - emacs/"Reply within emacs" +# - crypto/emacs_deliver_message +export HOME="${TMP_DIRECTORY}/home" +mkdir -p "${HOME}" + MAIL_DIR="${TMP_DIRECTORY}/mail" export GNUPGHOME="${TMP_DIRECTORY}/gnupg" export NOTMUCH_CONFIG="${TMP_DIRECTORY}/notmuch-config"