t7004: ship trustdb to avoid gpg warnings
[gitweb.git] / t / t4001-diff-rename.sh
index 08c11319a70be6dfbcc530d9462c36254a3acd8e..90c085f82814fc973ec7f0732b419cd631e9dc43 100755 (executable)
@@ -49,7 +49,7 @@ rename from path0
 rename to path1
 --- a/path0
 +++ b/path1
-@@ -8,7 +8,7 @@
+@@ -8,7 +8,7 @@ Line 7
  Line 8
  Line 9
  Line 10
@@ -64,4 +64,17 @@ test_expect_success \
     'validate the output.' \
     'compare_diff_patch current expected'
 
+test_expect_success 'favour same basenames over different ones' '
+       cp path1 another-path &&
+       git add another-path &&
+       git commit -m 1 &&
+       git rm path1 &&
+       mkdir subdir &&
+       git mv another-path subdir/path1 &&
+       git runstatus | grep "renamed: .*path1 -> subdir/path1"'
+
+test_expect_success  'favour same basenames even with minor differences' '
+       git show HEAD:path1 | sed "s/15/16/" > subdir/path1 &&
+       git runstatus | grep "renamed: .*path1 -> subdir/path1"'
+
 test_done