From: Karthik Nayak Date: Tue, 10 Nov 2026 11:50:02 GMT Subject: [PATCH 17/20] t9300: make the stream tests self-contained Message-ID: <20261110-kn-fast-import-tests-1-v1-17-dbd9ee502aae@gmail.com> In-Reply-To: <20261110-kn-fast-import-tests-1-v1-0-dbd9ee502aae@gmail.com> Similar to the previous commits, modify the tests in 'series R' which check empty and truncated streams, the 'quiet' option and the 'done' feature to make them independent of state from previous tests. 'empty stream succeeds' no longer needs to configure 'fastimport.unpackLimit', as that was moved to the first test needing it by an earlier commit. Signed-off-by: Karthik Nayak --- t/t9300-fast-import.sh | 122 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 79 insertions(+), 43 deletions(-) diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index cf00e4faf9..c719b2115e 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -38,11 +38,23 @@ echo "$@"' ### test_expect_success 'empty stream succeeds' ' - git fast-import input <<-EOF && - option git quiet - blob - data 3 - hi + test_when_finished "rm -rf repo" && + git init repo && + ( + cd repo && - EOF + cat >input <<-EOF && + option git quiet + blob + data 3 + hi - git fast-import 2>output output expect <<-\EOF && - OBJID - :000000 100644 OBJID OBJID A hello.c - :000000 100644 OBJID OBJID A hello2.c - EOF - git fast-import <<-EOF && - commit refs/heads/done-ends - committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE - data <actual && - test_cmp expect actual + test_when_finished "rm -rf repo" && + git init repo && + ( + cd repo && + + cat >expect <<-\EOF && + OBJID + :000000 100644 OBJID OBJID A hello.c + :000000 100644 OBJID OBJID A hello2.c + EOF + git fast-import <<-EOF && + commit refs/heads/done-ends + committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE + data <actual && + test_cmp expect actual + ) ' test_expect_success 'R: die on unknown option' ' -- 2.56.GIT