]> asedeno.scripts.mit.edu Git - git.git/blobdiff - t/t9500-gitweb-standalone-no-errors.sh
Merge branch 'tr/gcov'
[git.git] / t / t9500-gitweb-standalone-no-errors.sh
index 43cd6eecbac70f1ab63f19bf972f17c1f8188d5e..6ed10d0933daa493e7a32296b38e9a32a23a725a 100755 (executable)
@@ -43,9 +43,11 @@ gitweb_run () {
        GATEWAY_INTERFACE="CGI/1.1"
        HTTP_ACCEPT="*/*"
        REQUEST_METHOD="GET"
+       SCRIPT_NAME="$TEST_DIRECTORY/../gitweb/gitweb.perl"
        QUERY_STRING=""$1""
        PATH_INFO=""$2""
-       export GATEWAY_INTERFACE HTTP_ACCEPT REQUEST_METHOD QUERY_STRING PATH_INFO
+       export GATEWAY_INTERFACE HTTP_ACCEPT REQUEST_METHOD \
+               SCRIPT_NAME QUERY_STRING PATH_INFO
 
        GITWEB_CONFIG=$(pwd)/gitweb_config.perl
        export GITWEB_CONFIG
@@ -54,7 +56,7 @@ gitweb_run () {
        # written to web server logs, so we are not interested in that:
        # we are interested only in properly formatted errors/warnings
        rm -f gitweb.log &&
-       perl -- "$TEST_DIRECTORY/../gitweb/gitweb.perl" \
+       perl -- "$SCRIPT_NAME" \
                >/dev/null 2>gitweb.log &&
        if grep "^[[]" gitweb.log >/dev/null 2>&1; then false; else true; fi
 
@@ -659,6 +661,11 @@ cat >>gitweb_config.perl <<EOF
 \$feature{'snapshot'}{'override'} = 1;
 EOF
 
+test_expect_success \
+       'config override: tree view, features not overridden in repo config' \
+       'gitweb_run "p=.git;a=tree"'
+test_debug 'cat gitweb.log'
+
 test_expect_success \
        'config override: tree view, features disabled in repo config' \
        'git config gitweb.blame no &&
@@ -667,12 +674,23 @@ test_expect_success \
 test_debug 'cat gitweb.log'
 
 test_expect_success \
-       'config override: tree view, features enabled in repo config' \
+       'config override: tree view, features enabled in repo config (1)' \
        'git config gitweb.blame yes &&
         git config gitweb.snapshot "zip,tgz, tbz2" &&
         gitweb_run "p=.git;a=tree"'
 test_debug 'cat gitweb.log'
 
+cat >.git/config <<\EOF
+# testing noval and alternate separator
+[gitweb]
+       blame
+       snapshot = zip tgz
+EOF
+test_expect_success \
+       'config override: tree view, features enabled in repo config (2)' \
+       'gitweb_run "p=.git;a=tree"'
+test_debug 'cat gitweb.log'
+
 # ----------------------------------------------------------------------
 # non-ASCII in README.html