mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-01-18 17:25:57 +01:00
test/expect_equal_file: whitespace cleanup
No functional change, just reindent to Emacs defaults.
This commit is contained in:
parent
be6edee496
commit
f2e6f311c7
1 changed files with 21 additions and 21 deletions
|
@ -404,29 +404,29 @@ test_expect_equal () {
|
||||||
|
|
||||||
# Like test_expect_equal, but takes two filenames.
|
# Like test_expect_equal, but takes two filenames.
|
||||||
test_expect_equal_file () {
|
test_expect_equal_file () {
|
||||||
local file1 file2 testname basename1 basename2
|
local file1 file2 testname basename1 basename2
|
||||||
exec 1>&6 2>&7 # Restore stdout and stderr
|
exec 1>&6 2>&7 # Restore stdout and stderr
|
||||||
if [ -z "$inside_subtest" ]; then
|
if [ -z "$inside_subtest" ]; then
|
||||||
error "bug in the test script: test_expect_equal_file without test_begin_subtest"
|
error "bug in the test script: test_expect_equal_file without test_begin_subtest"
|
||||||
fi
|
fi
|
||||||
inside_subtest=
|
inside_subtest=
|
||||||
test "$#" = 2 ||
|
test "$#" = 2 ||
|
||||||
error "bug in the test script: not 2 parameters to test_expect_equal_file"
|
error "bug in the test script: not 2 parameters to test_expect_equal_file"
|
||||||
|
|
||||||
file1="$1"
|
file1="$1"
|
||||||
file2="$2"
|
file2="$2"
|
||||||
if ! test_skip "$test_subtest_name"
|
if ! test_skip "$test_subtest_name"
|
||||||
then
|
then
|
||||||
if diff -q "$file1" "$file2" >/dev/null ; then
|
if diff -q "$file1" "$file2" >/dev/null ; then
|
||||||
test_ok_
|
test_ok_
|
||||||
else
|
else
|
||||||
testname=$this_test.$test_count
|
testname=$this_test.$test_count
|
||||||
basename1=`basename "$file1"`
|
basename1=`basename "$file1"`
|
||||||
basename2=`basename "$file2"`
|
basename2=`basename "$file2"`
|
||||||
cp "$file1" "$testname.$basename1"
|
cp "$file1" "$testname.$basename1"
|
||||||
cp "$file2" "$testname.$basename2"
|
cp "$file2" "$testname.$basename2"
|
||||||
test_failure_ "$(diff -u "$testname.$basename1" "$testname.$basename2")"
|
test_failure_ "$(diff -u "$testname.$basename1" "$testname.$basename2")"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue