Skip to content

Commit 9297229

Browse files
john-caigitster
authored andcommitted
t4003-diff-rename-1: 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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9cfcbcc commit 9297229

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

t/t4003-diff-rename-1.sh

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ TEST_PASSES_SANITIZE_LEAK=true
1111
. ./test-lib.sh
1212
. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
1313

14-
test_expect_success \
15-
'prepare reference tree' \
16-
'COPYING_test_data >COPYING &&
17-
echo frotz >rezrov &&
18-
git update-index --add COPYING rezrov &&
19-
tree=$(git write-tree) &&
20-
echo $tree'
21-
22-
test_expect_success \
23-
'prepare work tree' \
24-
'sed -e 's/HOWEVER/However/' <COPYING >COPYING.1 &&
25-
sed -e 's/GPL/G.P.L/g' <COPYING >COPYING.2 &&
26-
rm -f COPYING &&
27-
git update-index --add --remove COPYING COPYING.?'
14+
test_expect_success 'prepare reference tree' '
15+
COPYING_test_data >COPYING &&
16+
echo frotz >rezrov &&
17+
git update-index --add COPYING rezrov &&
18+
tree=$(git write-tree) &&
19+
echo $tree
20+
'
21+
22+
test_expect_success 'prepare work tree' '
23+
sed -e 's/HOWEVER/However/' <COPYING >COPYING.1 &&
24+
sed -e 's/GPL/G.P.L/g' <COPYING >COPYING.2 &&
25+
rm -f COPYING &&
26+
git update-index --add --remove COPYING COPYING.?
27+
'
2828

2929
# tree has COPYING and rezrov. work tree has COPYING.1 and COPYING.2,
3030
# both are slightly edited, and unchanged rezrov. So we say you
@@ -57,14 +57,14 @@ rename to COPYING.2
5757
+ This file is licensed under the G.P.L v2, or a later version
5858
EOF
5959

60-
test_expect_success \
61-
'validate output from rename/copy detection (#1)' \
62-
'compare_diff_patch current expected'
60+
test_expect_success 'validate output from rename/copy detection (#1)' '
61+
compare_diff_patch current expected
62+
'
6363

64-
test_expect_success \
65-
'prepare work tree again' \
66-
'mv COPYING.2 COPYING &&
67-
git update-index --add --remove COPYING COPYING.1 COPYING.2'
64+
test_expect_success 'prepare work tree again' '
65+
mv COPYING.2 COPYING &&
66+
git update-index --add --remove COPYING COPYING.1 COPYING.2
67+
'
6868

6969
# tree has COPYING and rezrov. work tree has COPYING and COPYING.1,
7070
# both are slightly edited, and unchanged rezrov. So we say you
@@ -95,14 +95,14 @@ copy to COPYING.1
9595
+ However, in order to allow a migration to GPLv3 if that seems like
9696
EOF
9797

98-
test_expect_success \
99-
'validate output from rename/copy detection (#2)' \
100-
'compare_diff_patch current expected'
98+
test_expect_success 'validate output from rename/copy detection (#2)' '
99+
compare_diff_patch current expected
100+
'
101101

102-
test_expect_success \
103-
'prepare work tree once again' \
104-
'COPYING_test_data >COPYING &&
105-
git update-index --add --remove COPYING COPYING.1'
102+
test_expect_success 'prepare work tree once again' '
103+
COPYING_test_data >COPYING &&
104+
git update-index --add --remove COPYING COPYING.1
105+
'
106106

107107
# tree has COPYING and rezrov. work tree has COPYING and COPYING.1,
108108
# but COPYING is not edited. We say you copy-and-edit COPYING.1; this
@@ -123,8 +123,8 @@ copy to COPYING.1
123123
+ However, in order to allow a migration to GPLv3 if that seems like
124124
EOF
125125

126-
test_expect_success \
127-
'validate output from rename/copy detection (#3)' \
128-
'compare_diff_patch current expected'
126+
test_expect_success 'validate output from rename/copy detection (#3)' '
127+
compare_diff_patch current expected
128+
'
129129

130130
test_done

0 commit comments

Comments
 (0)