Merge branch 'sb/diff-color-move'
[gitweb.git] / t / t4015-diff-whitespace.sh
index 3bca958863e68783105b542765930ebd7518b49b..87083f728fed1be9d93d971419ac533ee5314d4f 100755 (executable)
@@ -155,7 +155,7 @@ test_expect_success 'ignore-blank-lines: only new lines' '
 " >x &&
        git diff --ignore-blank-lines >out &&
        >expect &&
-       test_cmp out expect
+       test_cmp expect out
 '
 
 test_expect_success 'ignore-blank-lines: only new lines with space' '
@@ -165,7 +165,7 @@ test_expect_success 'ignore-blank-lines: only new lines with space' '
  " >x &&
        git diff -w --ignore-blank-lines >out &&
        >expect &&
-       test_cmp out expect
+       test_cmp expect out
 '
 
 test_expect_success 'ignore-blank-lines: after change' '
@@ -1530,4 +1530,13 @@ test_expect_success 'move detection with submodules' '
        test_cmp expect decoded_actual
 '
 
+test_expect_success 'move detection with whitespace changes' '
+       test_when_finished "git reset --hard" &&
+       test_seq 10 >test &&
+       git add test &&
+       sed s/3/42/ <test >test.tmp &&
+       mv test.tmp test &&
+       git -c diff.colormoved diff --ignore-space-change -- test
+'
+
 test_done