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_DIRECTORY"/diff-lib.sh
15 test_expect_success SYMLINKS \
16 'prepare reference tree' \
17 'echo xyzzy | tr -d '\\\\'012 >yomin &&
19 git update-index --add frotz yomin &&
20 tree=$(git write-tree) &&
23 test_expect_success SYMLINKS \
29 git update-index --add --remove frotz rezrov nitfol bozbar yomin'
31 # tree has frotz pointing at xyzzy, and yomin that contains xyzzy to
32 # confuse things. work tree has rezrov (xyzzy) nitfol (xyzzy) and
34 # rezrov and nitfol are rename/copy of frotz and bozbar should be
37 test_expect_success SYMLINKS 'setup diff output' "
38 GIT_DIFF_OPTS=--unified=0 git diff-index -M -p $tree >current &&
40 diff --git a/bozbar b/bozbar
46 \ No newline at end of file
47 diff --git a/frotz b/nitfol
51 diff --git a/frotz b/rezrov
55 diff --git a/yomin b/yomin
56 deleted file mode 100644
61 \ No newline at end of file
65 test_expect_success SYMLINKS \
66 'validate diff output' \
67 'compare_diff_patch current expected'