Code

diff --stat: use a maximum of 5/8 for the filename part
[git.git] / t / t5704-bundle.sh
index a8f4419e610c4329cefc556684a7212f1405e104..4ae127d106c4a8ada0cea928affeff933bf0dbaa 100755 (executable)
@@ -30,4 +30,33 @@ test_expect_success 'tags can be excluded by rev-list options' '
 
 '
 
+test_expect_success 'die if bundle file cannot be created' '
+
+       mkdir adir &&
+       test_must_fail git bundle create adir --all
+
+'
+
+test_expect_failure 'bundle --stdin' '
+
+       echo master | git bundle create stdin-bundle.bdl --stdin &&
+       git ls-remote stdin-bundle.bdl >output &&
+       grep master output
+
+'
+
+test_expect_failure 'bundle --stdin <rev-list options>' '
+
+       echo master | git bundle create hybrid-bundle.bdl --stdin tag &&
+       git ls-remote hybrid-bundle.bdl >output &&
+       grep master output
+
+'
+
+test_expect_success 'empty bundle file is rejected' '
+
+    >empty-bundle && test_must_fail git fetch empty-bundle
+
+'
+
 test_done