@matheusbsbs / matheus-bagliano / commits / e9c34c233f
Fork 0

gitweb: Add tests for overriding gitweb config with repo config

Make blame view and snapshot support overridable by repository config. Test tree view with both features disabled, and with both features enabled. Test with features enabled also tests multiple formats snapshot support (in tree view). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jakub Narebski committed Nov 3, 2007 at 00:41 UTC e9c34c233f2e838c334f6e8a807ebc6a988e9509
1 file changed +23
t/t9500-gitweb-standalone-no-errors.sh
+23
@@ -557,4 +557,27 @@ test_expect_success \
557 'gitweb_run "p=.git;a=tree;opt=--no-merges"'
558 test_debug 'cat gitweb.log'
559
560 +# ----------------------------------------------------------------------
561 +# gitweb config and repo config
562 +
563 +cat >>gitweb_config.perl <<EOF
564 +
565 +\$feature{'blame'}{'override'} = 1;
566 +\$feature{'snapshot'}{'override'} = 1;
567 +EOF
568 +
569 +test_expect_success \
570 + 'config override: tree view, features disabled in repo config' \
571 + 'git config gitweb.blame no &&
572 + git config gitweb.snapshot none &&
573 + gitweb_run "p=.git;a=tree"'
574 +test_debug 'cat gitweb.log'
575 +
576 +test_expect_success \
577 + 'config override: tree view, features enabled in repo config' \
578 + 'git config gitweb.blame yes &&
579 + git config gitweb.snapshot "zip,tgz, tbz2" &&
580 + gitweb_run "p=.git;a=tree"'
581 +test_debug 'cat gitweb.log'
582 +
583 test_done