Merge branch 'maint' into bc/master-diff-hunk-header-fix
[gitweb.git] / t / t4020-diff-external.sh
index ed3bd5b3fe7c8b5ca52067e3015e0d770ee79bf2..dfe3fbc74b96fff50160c032f0a65ba54f9ad1b2 100755 (executable)
@@ -99,11 +99,12 @@ test_expect_success 'no diff with -diff' '
        git diff | grep Binary
 '
 
-echo NULZbetweenZwords | tr Z '\0' > file
+echo NULZbetweenZwords | perl -pe 'y/Z/\000/' > file
 
 test_expect_success 'force diff with "diff"' '
        echo >.gitattributes "file diff" &&
-       git diff | grep -a second
+       git diff >actual &&
+       test_cmp "$TEST_DIRECTORY"/t4020/diff.NUL actual
 '
 
 test_done