Code

t4020: don't use grep -a
authorJeff King <peff@peff.net>
Wed, 12 Mar 2008 21:37:37 +0000 (17:37 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Mar 2008 07:57:53 +0000 (00:57 -0700)
Solaris /usr/bin/grep doesn't understand "-a". In this case
we can just include the expected output with the test, which
is a better test anyway.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4020-diff-external.sh
t/t4020/diff.NUL [new file with mode: 0644]

index bf8f778a471b7fdb21b6e6df473222593439ba34..637b4e19d52e81cf1472a4ed9dcfb0c9ff00da2b 100755 (executable)
@@ -103,7 +103,8 @@ 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
diff --git a/t/t4020/diff.NUL b/t/t4020/diff.NUL
new file mode 100644 (file)
index 0000000..db2f890
Binary files /dev/null and b/t/t4020/diff.NUL differ