git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitweb: Fix test of highlighting support in t9500

From
Jakub Narebski <jnareb@gmail.com>
Date
Oct 13, 2010, 11:57 UTC
Message-ID
<20101013115657.11392.76179.stgit@localhost.localdomain>

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>
---
Noticed while running t9500 with `--debug` option.
 t/t9500-gitweb-standalone-no-errors.sh |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh
index 4f2b9b0..21cd286 100755
--- a/t/t9500-gitweb-standalone-no-errors.sh
+++ b/t/t9500-gitweb-standalone-no-errors.sh
@@ -650,25 +650,26 @@ test_debug 'cat gitweb.log'
 # ----------------------------------------------------------------------
 # syntax highlighting
 
-cat >>gitweb_config.perl <<\EOF
-$feature{'highlight'}{'override'} = 1;
-EOF
 
 highlight --version >/dev/null 2>&1
 if [ $? -eq 127 ]; then
 	say "Skipping syntax highlighting test, because 'highlight' was not found"
 else
 	test_set_prereq HIGHLIGHT
+	cat >>gitweb_config.perl <<-\EOF
+	our $highlight_bin = "highlight";
+	$feature{'highlight'}{'override'} = 1;
+	EOF
 fi
 
 test_expect_success HIGHLIGHT \
-	'syntax highlighting (no highlight)' \
+	'syntax highlighting (no highlight, unknown syntax)' \
 	'git config gitweb.highlight yes &&
 	 gitweb_run "p=.git;a=blob;f=file"'
 test_debug 'cat gitweb.log'
 
 test_expect_success HIGHLIGHT \
-	'syntax highlighting (highlighted)' \
+	'syntax highlighting (highlighted, shell script)' \
 	'git config gitweb.highlight yes &&
 	 echo "#!/usr/bin/sh" > test.sh &&
 	 git add test.sh &&
Message 1 of 1 in “gitweb: Fix test of highlighting support in t9500”
  1. gitweb: Fix test of highlighting support in t9500Jakub Narebski, Oct 13, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.