Skip to content

Commit ae5e97e

Browse files
jnarebgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c72781d commit ae5e97e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

t/t9500-gitweb-standalone-no-errors.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -650,25 +650,26 @@ test_debug 'cat gitweb.log'
650650
# ----------------------------------------------------------------------
651651
# syntax highlighting
652652

653-
cat >>gitweb_config.perl <<\EOF
654-
$feature{'highlight'}{'override'} = 1;
655-
EOF
656653

657654
highlight --version >/dev/null 2>&1
658655
if [ $? -eq 127 ]; then
659656
say "Skipping syntax highlighting test, because 'highlight' was not found"
660657
else
661658
test_set_prereq HIGHLIGHT
659+
cat >>gitweb_config.perl <<-\EOF
660+
our $highlight_bin = "highlight";
661+
$feature{'highlight'}{'override'} = 1;
662+
EOF
662663
fi
663664

664665
test_expect_success HIGHLIGHT \
665-
'syntax highlighting (no highlight)' \
666+
'syntax highlighting (no highlight, unknown syntax)' \
666667
'git config gitweb.highlight yes &&
667668
gitweb_run "p=.git;a=blob;f=file"'
668669
test_debug 'cat gitweb.log'
669670

670671
test_expect_success HIGHLIGHT \
671-
'syntax highlighting (highlighted)' \
672+
'syntax highlighting (highlighted, shell script)' \
672673
'git config gitweb.highlight yes &&
673674
echo "#!/usr/bin/sh" > test.sh &&
674675
git add test.sh &&

0 commit comments

Comments
 (0)