]> git.ipfire.org Git - thirdparty/git.git/commitdiff
gitweb: Add tests for overriding gitweb config with repo config
authorJakub Narebski <jnareb@gmail.com>
Fri, 2 Nov 2007 23:41:18 +0000 (00:41 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 3 Nov 2007 01:27:35 +0000 (18:27 -0700)
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>
t/t9500-gitweb-standalone-no-errors.sh

index 1bf0988d9a87da7c069de6a981cec50cd26baef8..35fff3ddbad562d264b4a65f43021a5f7f912e70 100755 (executable)
@@ -557,4 +557,27 @@ test_expect_success \
        'gitweb_run "p=.git;a=tree;opt=--no-merges"'
 test_debug 'cat gitweb.log'
 
+# ----------------------------------------------------------------------
+# gitweb config and repo config
+
+cat >>gitweb_config.perl <<EOF
+
+\$feature{'blame'}{'override'} = 1;
+\$feature{'snapshot'}{'override'} = 1;
+EOF
+
+test_expect_success \
+       'config override: tree view, features disabled in repo config' \
+       'git config gitweb.blame no &&
+        git config gitweb.snapshot none &&
+        gitweb_run "p=.git;a=tree"'
+test_debug 'cat gitweb.log'
+
+test_expect_success \
+       'config override: tree view, features enabled in repo config' \
+       'git config gitweb.blame yes &&
+        git config gitweb.snapshot "zip,tgz, tbz2" &&
+        gitweb_run "p=.git;a=tree"'
+test_debug 'cat gitweb.log'
+
 test_done