1
0
mirror of https://github.com/git/git synced 2024-06-30 22:54:27 +00:00

t4004-diff-rename-symlink: modernize test format

Some tests still use the old format with four spaces indentation.
Standardize the tests to the new format with tab indentation.

Signed-off-by: John Cai <johncai86@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
John Cai 2023-05-18 20:03:17 +00:00 committed by Junio C Hamano
parent 9297229d15
commit 93fc423e9a

View File

@ -14,21 +14,21 @@ TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-diff.sh
test_expect_success SYMLINKS \
'prepare reference tree' \
'echo xyzzy | tr -d '\\\\'012 >yomin &&
ln -s xyzzy frotz &&
git update-index --add frotz yomin &&
tree=$(git write-tree) &&
echo $tree'
test_expect_success SYMLINKS 'prepare reference tree' '
echo xyzzy | tr -d '\\\\'012 >yomin &&
ln -s xyzzy frotz &&
git update-index --add frotz yomin &&
tree=$(git write-tree) &&
echo $tree
'
test_expect_success SYMLINKS \
'prepare work tree' \
'mv frotz rezrov &&
rm -f yomin &&
ln -s xyzzy nitfol &&
ln -s xzzzy bozbar &&
git update-index --add --remove frotz rezrov nitfol bozbar yomin'
test_expect_success SYMLINKS 'prepare work tree' '
mv frotz rezrov &&
rm -f yomin &&
ln -s xyzzy nitfol &&
ln -s xzzzy bozbar &&
git update-index --add --remove frotz rezrov nitfol bozbar yomin
'
# tree has frotz pointing at xyzzy, and yomin that contains xyzzy to
# confuse things. work tree has rezrov (xyzzy) nitfol (xyzzy) and
@ -36,9 +36,9 @@ test_expect_success SYMLINKS \
# rezrov and nitfol are rename/copy of frotz and bozbar should be
# a new creation.
test_expect_success SYMLINKS 'setup diff output' "
GIT_DIFF_OPTS=--unified=0 git diff-index -C -p $tree >current &&
cat >expected <<\EOF
test_expect_success SYMLINKS 'setup diff output' '
GIT_DIFF_OPTS=--unified=0 git diff-index -C -p $tree >current &&
cat >expected <<\EOF
diff --git a/bozbar b/bozbar
new file mode 120000
--- /dev/null
@ -62,10 +62,10 @@ deleted file mode 100644
-xyzzy
\ No newline at end of file
EOF
"
'
test_expect_success SYMLINKS \
'validate diff output' \
'compare_diff_patch current expected'
test_expect_success SYMLINKS 'validate diff output' '
compare_diff_patch current expected
'
test_done