cat-file: split --batch input lines on whitespace
[gitweb.git] / t / t1006-cat-file.sh
index 4e911fb43d8ea2c699b3a836547b618274db6e05..d499d02a29f3ec5fb15d86835d24ccabd322df56 100755 (executable)
@@ -78,6 +78,13 @@ $content"
        echo $sha1 | git cat-file --batch-check="%(objecttype) %(objectname)" >actual &&
        test_cmp expect actual
     '
+
+    test_expect_success '--batch-check with %(rest)' '
+       echo "$type this is some extra content" >expect &&
+       echo "$sha1    this is some extra content" |
+               git cat-file --batch-check="%(objecttype) %(rest)" >actual &&
+       test_cmp expect actual
+    '
 }
 
 hello_content="Hello World"