Merge branch 'jc/maint-checkout-keep-remove'
[gitweb.git] / t / t4020-diff-external.sh
index f0045cd788a275f525bbd94912c5ad09cf6226bd..dfe3fbc74b96fff50160c032f0a65ba54f9ad1b2 100755 (executable)
@@ -94,4 +94,17 @@ test_expect_success 'diff attribute should apply only to diff' '
 
 '
 
+test_expect_success 'no diff with -diff' '
+       echo >.gitattributes "file -diff" &&
+       git diff | grep Binary
+'
+
+echo NULZbetweenZwords | perl -pe 'y/Z/\000/' > file
+
+test_expect_success 'force diff with "diff"' '
+       echo >.gitattributes "file diff" &&
+       git diff >actual &&
+       test_cmp "$TEST_DIRECTORY"/t4020/diff.NUL actual
+'
+
 test_done