On Thu, Jan 4, 2024 at 12:33 PM Taylor Blau <me@xxxxxxxxxxxx> wrote: > On Thu, Jan 04, 2024 at 03:33:55PM +0100, Tamino Bauknecht wrote: > > +cat > expect << EOF > > + one/main > > + ... > > +EOF > > It looks like these tests match the existing style of the test suite, > but they are somewhat out of date with respect to our more modern > standards. I would probably write this like: > > test_expect_success 'git fetch --all (works with fetch.all = true)' ' > git clone one test10 && > test_config -C test10 fetch.all true && > for r in one two three > do > git -C test10 remote add $r ../$r || return 1 > done && > git -C test10 fetch --all && > git -C test10 branch -r >actual && > test_cmp expect actual > ' If you (Taylor) were writing these tests, you would also create the "expect" file inside the test body: test_expect_success 'git fetch --all (works with fetch.all = true)' ' cat >expect <<-\EOF && one/main ... EOF git clone one test10 && ... The <<- operator which Taylor used in his example allows you to indent the body of the heredoc, so it can be indented the same amount as the test body itself.