Skip to content

Commit d8cd327

Browse files
peffgitster
authored andcommitted
t9502: fix &&-chain breakage
This script misses a trivial &&-chain in one of its tests, but it also has a weird reverse: it includes an &&-chain outside of any test_expect block! This "cat" should never fail, but if it did, we would not notice, as it would cause us to skip the follow-on test entirely (which does not appear intentional; there are many later tests which rely on this cat). Let's instead move the setup into its own test_expect_success block, which is the standard practice nowadays. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent aef591a commit d8cd327

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

t/t9502-gitweb-standalone-parse-output.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,11 @@ test_expect_success 'forks: not skipped unless "forks" feature enabled' '
145145
grep -q ">fork of .*<" gitweb.body
146146
'
147147

148-
cat >>gitweb_config.perl <<\EOF &&
149-
$feature{'forks'}{'default'} = [1];
150-
EOF
148+
test_expect_success 'enable forks feature' '
149+
cat >>gitweb_config.perl <<-\EOF
150+
$feature{"forks"}{"default"} = [1];
151+
EOF
152+
'
151153

152154
test_expect_success 'forks: forks skipped if "forks" feature enabled' '
153155
gitweb_run "a=project_list" &&
@@ -173,7 +175,7 @@ test_expect_success 'forks: can access forked repository' '
173175
'
174176

175177
test_expect_success 'forks: project_index lists all projects (incl. forks)' '
176-
cat >expected <<-\EOF
178+
cat >expected <<-\EOF &&
177179
.git
178180
foo.bar.git
179181
foo.git

0 commit comments

Comments
 (0)