summaryrefslogtreecommitdiff
path: root/t/t9500-gitweb-standalone-no-errors.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-10-03 13:30:33 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-10-03 13:30:34 -0700
commit347408496a08f18b49b3646b6bb20d17cce85632 (patch)
tree81e9e190c83c0d33e5b0cf45bc0be561868a53e5 /t/t9500-gitweb-standalone-no-errors.sh
parentMerge branch 'rs/copy-array' (diff)
parentgitweb: use highlight's shebang detection (diff)
downloadtgif-347408496a08f18b49b3646b6bb20d17cce85632.tar.xz
Merge branch 'ik/gitweb-force-highlight'
"gitweb" can spawn "highlight" to show blob contents with (programming) language-specific syntax highlighting, but only when the language is known. "highlight" can however be told to make the guess itself by giving it "--force" option, which has been enabled. * ik/gitweb-force-highlight: gitweb: use highlight's shebang detection gitweb: remove unused guess_file_syntax() parameter
Diffstat (limited to 't/t9500-gitweb-standalone-no-errors.sh')
-rwxr-xr-xt/t9500-gitweb-standalone-no-errors.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh
index e94b2f147a..6d06ed96cb 100755
--- a/t/t9500-gitweb-standalone-no-errors.sh
+++ b/t/t9500-gitweb-standalone-no-errors.sh
@@ -709,6 +709,14 @@ test_expect_success HIGHLIGHT \
git commit -m "Add test.sh" &&
gitweb_run "p=.git;a=blob;f=test.sh"'
+test_expect_success HIGHLIGHT \
+ 'syntax highlighting (highlighter language autodetection)' \
+ 'git config gitweb.highlight yes &&
+ echo "#!/usr/bin/perl" > test &&
+ git add test &&
+ git commit -m "Add test" &&
+ gitweb_run "p=.git;a=blob;f=test"'
+
# ----------------------------------------------------------------------
# forks of projects