summaryrefslogtreecommitdiff
path: root/t/t9502-gitweb-standalone-parse-output.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2015-03-20 10:13:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-03-20 18:35:50 (GMT)
commitd8cd32792a0a8a52ff4f5f4bb74f9044bcb9a97a (patch)
tree6a18e82c7d032ce407407ab62d6072a794063c4c /t/t9502-gitweb-standalone-parse-output.sh
parentaef591a0f91a80d2b39c5344653861967d70d720 (diff)
downloadgit-d8cd32792a0a8a52ff4f5f4bb74f9044bcb9a97a.zip
git-d8cd32792a0a8a52ff4f5f4bb74f9044bcb9a97a.tar.gz
git-d8cd32792a0a8a52ff4f5f4bb74f9044bcb9a97a.tar.bz2
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>
Diffstat (limited to 't/t9502-gitweb-standalone-parse-output.sh')
-rwxr-xr-xt/t9502-gitweb-standalone-parse-output.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/t/t9502-gitweb-standalone-parse-output.sh b/t/t9502-gitweb-standalone-parse-output.sh
index 86dfee2..0796a43 100755
--- a/t/t9502-gitweb-standalone-parse-output.sh
+++ b/t/t9502-gitweb-standalone-parse-output.sh
@@ -145,9 +145,11 @@ test_expect_success 'forks: not skipped unless "forks" feature enabled' '
grep -q ">fork of .*<" gitweb.body
'
-cat >>gitweb_config.perl <<\EOF &&
-$feature{'forks'}{'default'} = [1];
-EOF
+test_expect_success 'enable forks feature' '
+ cat >>gitweb_config.perl <<-\EOF
+ $feature{"forks"}{"default"} = [1];
+ EOF
+'
test_expect_success 'forks: forks skipped if "forks" feature enabled' '
gitweb_run "a=project_list" &&
@@ -173,7 +175,7 @@ test_expect_success 'forks: can access forked repository' '
'
test_expect_success 'forks: project_index lists all projects (incl. forks)' '
- cat >expected <<-\EOF
+ cat >expected <<-\EOF &&
.git
foo.bar.git
foo.git