Code

diff-index: careful when inspecting work tree items
[git.git] / t / t4020-diff-external.sh
index 888293361d4ec39e389b321493dac8ed08886d7c..637b4e19d52e81cf1472a4ed9dcfb0c9ff00da2b 100755 (executable)
@@ -99,11 +99,12 @@ test_expect_success 'no diff with -diff' '
        git diff | grep Binary
 '
 
-echo NULZbetweenZwords | tr Z '\000' > 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 ../t4020/diff.NUL actual
 '
 
 test_done