mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 12:28:09 +01:00
test: copy files in test_expect_equal_file instead of moving them
Before the change, test_expect_equal_file moved files it compared in case of failure. The patch changes it to copy the files instead. This allows testing non-temporary files which are stored in git. Note: the change should not result in new temporary files left after the tests. Test_expect_equal_file used to move files only on failure, so callers had to cleanup them anyway.
This commit is contained in:
parent
a87a6b99f9
commit
59a9c36316
1 changed files with 2 additions and 2 deletions
|
@ -477,8 +477,8 @@ test_expect_equal_file ()
|
||||||
test_ok_ "$test_subtest_name"
|
test_ok_ "$test_subtest_name"
|
||||||
else
|
else
|
||||||
testname=$this_test.$test_count
|
testname=$this_test.$test_count
|
||||||
mv "$output" $testname.output
|
cp "$output" $testname.output
|
||||||
mv "$expected" $testname.expected
|
cp "$expected" $testname.expected
|
||||||
test_failure_ "$test_subtest_name" "$(diff -u $testname.expected $testname.output)"
|
test_failure_ "$test_subtest_name" "$(diff -u $testname.expected $testname.output)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue