3 # Copyright (c) 2005 Junio C Hamano
6 test_description
='More rename detection tests.
8 The rename detection logic should be able to detect pure rename or
9 copy of symbolic links, but should not produce rename/copy followed
13 TEST_PASSES_SANITIZE_LEAK
=true
15 .
"$TEST_DIRECTORY"/lib-diff.sh
17 test_expect_success SYMLINKS \
18 'prepare reference tree' \
19 'echo xyzzy | tr -d '\\\\'012 >yomin &&
21 git update-index --add frotz yomin &&
22 tree=$(git write-tree) &&
25 test_expect_success SYMLINKS \
31 git update-index --add --remove frotz rezrov nitfol bozbar yomin'
33 # tree has frotz pointing at xyzzy, and yomin that contains xyzzy to
34 # confuse things. work tree has rezrov (xyzzy) nitfol (xyzzy) and
36 # rezrov and nitfol are rename/copy of frotz and bozbar should be
39 test_expect_success SYMLINKS
'setup diff output' "
40 GIT_DIFF_OPTS=--unified=0 git diff-index -C -p $tree >current &&
42 diff --git a/bozbar b/bozbar
48 \ No newline at end of file
49 diff --git a/frotz b/nitfol
53 diff --git a/frotz b/rezrov
57 diff --git a/yomin b/yomin
58 deleted file mode 100644
63 \ No newline at end of file
67 test_expect_success SYMLINKS \
68 'validate diff output' \
69 'compare_diff_patch current expected'