3 # Copyright (c) 2005 Junio C Hamano
6 test_description
='More rename detection
10 TEST_PASSES_SANITIZE_LEAK
=true
12 .
"$TEST_DIRECTORY"/lib-diff.sh
;# test-lib chdir's into trash
15 'prepare reference tree' \
16 'COPYING_test_data >COPYING &&
18 git update-index --add COPYING rezrov &&
19 tree=$(git write-tree) &&
24 'sed -e 's
/HOWEVER
/However
/' <COPYING >COPYING.1 &&
25 sed -e 's
/GPL
/G.P.L
/g
' <COPYING >COPYING.2 &&
27 git update-index --add --remove COPYING COPYING.?'
29 # tree has COPYING and rezrov. work tree has COPYING.1 and COPYING.2,
30 # both are slightly edited, and unchanged rezrov. So we say you
31 # copy-and-edit one, and rename-and-edit the other. We do not say
32 # anything about rezrov.
34 GIT_DIFF_OPTS
=--unified=0 git diff-index
-C -p $tree >current
36 diff --git a
/COPYING b
/COPYING
.1
42 - HOWEVER
, in order to allow a migration to GPLv3
if that seems like
43 + However
, in order to allow a migration to GPLv3
if that seems like
44 diff --git a
/COPYING b
/COPYING
.2
50 - Note that the only valid version of the GPL as far as this project
51 + Note that the only valid version of the G.P.L as far as this project
53 - HOWEVER
, in order to allow a migration to GPLv3
if that seems like
54 + HOWEVER
, in order to allow a migration to G.P.Lv3
if that seems like
56 - This
file is licensed under the GPL v2
, or a later version
57 + This
file is licensed under the G.P.L v2
, or a later version
61 'validate output from rename/copy detection (#1)' \
62 'compare_diff_patch current expected'
65 'prepare work tree again' \
66 'mv COPYING.2 COPYING &&
67 git update-index --add --remove COPYING COPYING.1 COPYING.2'
69 # tree has COPYING and rezrov. work tree has COPYING and COPYING.1,
70 # both are slightly edited, and unchanged rezrov. So we say you
71 # edited one, and copy-and-edit the other. We do not say
72 # anything about rezrov.
74 GIT_DIFF_OPTS
=--unified=0 git diff-index
-C -p $tree >current
76 diff --git a
/COPYING b
/COPYING
80 - Note that the only valid version of the GPL as far as this project
81 + Note that the only valid version of the G.P.L as far as this project
83 - HOWEVER
, in order to allow a migration to GPLv3
if that seems like
84 + HOWEVER
, in order to allow a migration to G.P.Lv3
if that seems like
86 - This
file is licensed under the GPL v2
, or a later version
87 + This
file is licensed under the G.P.L v2
, or a later version
88 diff --git a
/COPYING b
/COPYING
.1
94 - HOWEVER
, in order to allow a migration to GPLv3
if that seems like
95 + However
, in order to allow a migration to GPLv3
if that seems like
99 'validate output from rename/copy detection (#2)' \
100 'compare_diff_patch current expected'
102 test_expect_success \
103 'prepare work tree once again' \
104 'COPYING_test_data >COPYING &&
105 git update-index --add --remove COPYING COPYING.1'
107 # tree has COPYING and rezrov. work tree has COPYING and COPYING.1,
108 # but COPYING is not edited. We say you copy-and-edit COPYING.1; this
109 # is only possible because -C mode now reports the unmodified file to
110 # the diff-core. Unchanged rezrov, although being fed to
111 # git diff-index as well, should not be mentioned.
113 GIT_DIFF_OPTS
=--unified=0 \
114 git diff-index
-C --find-copies-harder -p $tree >current
116 diff --git a
/COPYING b
/COPYING
.1
122 - HOWEVER
, in order to allow a migration to GPLv3
if that seems like
123 + However
, in order to allow a migration to GPLv3
if that seems like
126 test_expect_success \
127 'validate output from rename/copy detection (#3)' \
128 'compare_diff_patch current expected'