]> git.ipfire.org Git - thirdparty/git.git/commitdiff
mktag tests: test fast-export
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 17 Jun 2021 10:42:02 +0000 (12:42 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 28 Jun 2021 16:30:41 +0000 (09:30 -0700)
Pass the bad tags we've created in the mktag tests through
fast-export, it will die on the bad object or ref, let's make sure
that happens.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3800-mktag.sh

index bb7130339959e6b6243dfda5d227c0715f79c001..0544d58a6ea5478f046b571f7e249a5942da37e2 100755 (executable)
@@ -91,6 +91,14 @@ check_verify_failure () {
 
                test_must_fail git -C bad-tag for-each-ref --format="%(*objectname)"
        '
+
+       test_expect_success "fast-export & fast-import: $subject" '
+               # Make sure the earlier test created it for us
+               git rev-parse "$bad_tag" &&
+
+               test_must_fail git -C bad-tag fast-export --all &&
+               test_must_fail git -C bad-tag fast-export "$bad_tag"
+       '
 }
 
 test_expect_mktag_success() {