]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5000-tar-tree.sh
git-archive: add --output=<file> to send output to a file
[thirdparty/git.git] / t / t5000-tar-tree.sh
index c942c8be85339157e22f755d8fc94e64efaee4dd..b7e362834bd743b61c27a4fd2118a83b14828489 100755 (executable)
@@ -86,6 +86,10 @@ test_expect_success \
     'git archive vs. the same in a bare repo' \
     'test_cmp b.tar b3.tar'
 
+test_expect_success 'git archive with --output' \
+    'git archive --output=b4.tar HEAD &&
+    test_cmp b.tar b4.tar'
+
 test_expect_success \
     'validate file modification time' \
     'mkdir extract &&
@@ -172,6 +176,10 @@ test_expect_success \
     'git archive --format=zip vs. the same in a bare repo' \
     'test_cmp d.zip d1.zip'
 
+test_expect_success 'git archive --format=zip with --output' \
+    'git archive --format=zip --output=d2.zip HEAD &&
+    test_cmp d.zip d2.zip'
+
 $UNZIP -v >/dev/null 2>&1
 if [ $? -eq 127 ]; then
        echo "Skipping ZIP tests, because unzip was not found"