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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Mar 20, 2015 at 06:13 UTC d8cd32792a0a8a52ff4f5f4bb74f9044bcb9a97a
1 file changed +6 -4
t/t9502-gitweb-standalone-parse-output.sh
+6 -4
@@ -145,9 +145,11 @@ test_expect_success 'forks: not skipped unless "forks" feature enabled' '
145 grep -q ">fork of .*<" gitweb.body
146 '
147
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 +'
153
154 test_expect_success 'forks: forks skipped if "forks" feature enabled' '
155 gitweb_run "a=project_list" &&
@@ -173,7 +175,7 @@ test_expect_success 'forks: can access forked repository' '
175 '
176
177 test_expect_success 'forks: project_index lists all projects (incl. forks)' '
176 - cat >expected <<-\EOF
178 + cat >expected <<-\EOF &&
179 .git
180 foo.bar.git
181 foo.git