gitweb: Fix test of highlighting support in t9500
The commit 7ce896b (Enable highlight executable path as a configuration option, 2010-09-21) forgot to update t9500 test. While at it, describe highlight test better. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jakub Narebski committed
Oct 13, 2010 at 13:57 UTC
ae5e97ec40a36408a8f90973c23e6143741ec732
1 file changed
+6
-5
t/t9500-gitweb-standalone-no-errors.sh
+6
-5
@@ -650,25 +650,26 @@ test_debug 'cat gitweb.log'
650
# ----------------------------------------------------------------------
651
# syntax highlighting
652
653
-cat >>gitweb_config.perl <<\EOF
654
-$feature{'highlight'}{'override'} = 1;
655
-EOF
653
654
highlight --version >/dev/null 2>&1
655
if [ $? -eq 127 ]; then
656
say "Skipping syntax highlighting test, because 'highlight' was not found"
657
else
658
test_set_prereq HIGHLIGHT
659
+ cat >>gitweb_config.perl <<-\EOF
660
+ our $highlight_bin = "highlight";
661
+ $feature{'highlight'}{'override'} = 1;
662
+ EOF
663
fi
664
665
test_expect_success HIGHLIGHT \
665
- 'syntax highlighting (no highlight)' \
666
+ 'syntax highlighting (no highlight, unknown syntax)' \
667
'git config gitweb.highlight yes &&
668
gitweb_run "p=.git;a=blob;f=file"'
669
test_debug 'cat gitweb.log'
670
671
test_expect_success HIGHLIGHT \
671
- 'syntax highlighting (highlighted)' \
672
+ 'syntax highlighting (highlighted, shell script)' \
673
'git config gitweb.highlight yes &&
674
echo "#!/usr/bin/sh" > test.sh &&
675
git add test.sh &&