File tree Expand file tree Collapse file tree 1 file changed +35
-31
lines changed
Expand file tree Collapse file tree 1 file changed +35
-31
lines changed Original file line number Diff line number Diff line change @@ -9,21 +9,40 @@ test_description='Test rename detection in diff engine.
99. ./test-lib.sh
1010. " $TEST_DIRECTORY " /diff-lib.sh
1111
12- echo > path0 ' Line 1
13- Line 2
14- Line 3
15- Line 4
16- Line 5
17- Line 6
18- Line 7
19- Line 8
20- Line 9
21- Line 10
22- line 11
23- Line 12
24- Line 13
25- Line 14
26- Line 15
12+ test_expect_success ' setup' '
13+ cat >path0 <<-\EOF &&
14+ Line 1
15+ Line 2
16+ Line 3
17+ Line 4
18+ Line 5
19+ Line 6
20+ Line 7
21+ Line 8
22+ Line 9
23+ Line 10
24+ line 11
25+ Line 12
26+ Line 13
27+ Line 14
28+ Line 15
29+ EOF
30+ cat >expected <<-\EOF
31+ diff --git a/path0 b/path1
32+ rename from path0
33+ rename to path1
34+ --- a/path0
35+ +++ b/path1
36+ @@ -8,7 +8,7 @@ Line 7
37+ Line 8
38+ Line 9
39+ Line 10
40+ -line 11
41+ +Line 11
42+ Line 12
43+ Line 13
44+ Line 14
45+ EOF
2746'
2847
2948test_expect_success \
@@ -43,22 +62,7 @@ test_expect_success \
4362test_expect_success \
4463 ' git diff-index -p -M after rename and editing.' \
4564 ' git diff-index -p -M $tree >current'
46- cat > expected << \EOF
47- diff --git a/path0 b/path1
48- rename from path0
49- rename to path1
50- --- a/path0
51- +++ b/path1
52- @@ -8,7 +8,7 @@ Line 7
53- Line 8
54- Line 9
55- Line 10
56- -line 11
57- +Line 11
58- Line 12
59- Line 13
60- Line 14
61- EOF
65+
6266
6367test_expect_success \
6468 ' validate the output.' \
You can’t perform that action at this time.
0 commit comments