Skip to content

Commit

Permalink
gitweb: Add tests for overriding gitweb config with repo config
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jakub Narebski authored and Junio C Hamano committed Nov 3, 2007
1 parent a3823e5 commit e9c34c2
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions t/t9500-gitweb-standalone-no-errors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e9c34c2

Please sign in to comment.