summaryrefslogtreecommitdiff
path: root/t/t4071-diff-minimal.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t4071-diff-minimal.sh')
-rwxr-xr-xt/t4071-diff-minimal.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t4071-diff-minimal.sh b/t/t4071-diff-minimal.sh
new file mode 100755
index 0000000000..4c484dadfb
--- /dev/null
+++ b/t/t4071-diff-minimal.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+test_description='minimal diff algorithm'
+
+. ./test-lib.sh
+
+test_expect_success 'minimal diff should not mark changes between changed lines' '
+ test_write_lines x x x x >pre &&
+ test_write_lines x x x A B C D x E F G >post &&
+ test_expect_code 1 git diff --no-index --minimal pre post >diff &&
+ test_grep ! ^[+-]x diff
+'
+
+test_done