Sync with 'maint'
[gitweb.git] / t / t8007-cat-file-textconv.sh
index b95e102891db65c184a2ee3137f1b3e20cdab2db..eacd49ade636f5be6166e05d4e200b9a324073be 100755 (executable)
@@ -20,11 +20,11 @@ test_expect_success 'setup ' '
 '
 
 cat >expected <<EOF
-fatal: git cat-file --textconv: unable to run textconv on :one.bin
+bin: test version 2
 EOF
 
 test_expect_success 'no filter specified' '
-       git cat-file --textconv :one.bin 2>result
+       git cat-file --textconv :one.bin >result &&
        test_cmp expected result
 '
 
@@ -34,10 +34,6 @@ test_expect_success 'setup textconv filters' '
        git config diff.test.cachetextconv false
 '
 
-cat >expected <<EOF
-bin: test version 2
-EOF
-
 test_expect_success 'cat-file without --textconv' '
        git cat-file blob :one.bin >result &&
        test_cmp expected result
@@ -71,25 +67,19 @@ test_expect_success 'cat-file --textconv on previous commit' '
 '
 
 test_expect_success 'cat-file without --textconv (symlink)' '
+       printf "%s" "one.bin" >expected &&
        git cat-file blob :symlink.bin >result &&
-       printf "%s" "one.bin" >expected
        test_cmp expected result
 '
 
 
 test_expect_success 'cat-file --textconv on index (symlink)' '
-       ! git cat-file --textconv :symlink.bin 2>result &&
-       cat >expected <<\EOF &&
-fatal: git cat-file --textconv: unable to run textconv on :symlink.bin
-EOF
+       git cat-file --textconv :symlink.bin >result &&
        test_cmp expected result
 '
 
 test_expect_success 'cat-file --textconv on HEAD (symlink)' '
-       ! git cat-file --textconv HEAD:symlink.bin 2>result &&
-       cat >expected <<EOF &&
-fatal: git cat-file --textconv: unable to run textconv on HEAD:symlink.bin
-EOF
+       git cat-file --textconv HEAD:symlink.bin >result &&
        test_cmp expected result
 '