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

[PATCH] t9500: skip gitweb tests if perl version is too old

From
SVSven Verdoolaege <skimo@kotnet.org>
Date
Jun 22, 2007, 15:49 UTC
Message-ID
<20070622154908.GA7946MdfPADPa@greensroom.kotnet.org>

gitweb calls Encode::decode_utf8 with two arguments, but old versions of perl only allow this function to be called with one argument. Even older versions of perl do not even have an Encode module.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
---
 t/t9500-gitweb-standalone-no-errors.sh |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh
index 44ae503..d948724 100755
--- a/t/t9500-gitweb-standalone-no-errors.sh
+++ b/t/t9500-gitweb-standalone-no-errors.sh
@@ -60,6 +60,12 @@ gitweb_run () {
 
 . ./test-lib.sh
 
+perl -MEncode -e 'decode_utf8("", Encode::FB_CROAK)' >/dev/null 2>&1 || {
+    test_expect_success 'skipping gitweb tests, perl version is too old' :
+    test_done
+    exit
+}
+
 gitweb_init
 
 # ----------------------------------------------------------------------
-- 
1.5.2.2.249.g45fd
Next: Junio C Hamano
Message 1 of 5 in “t9500: skip gitweb tests if perl version is too old”
  1. t9500: skip gitweb tests if perl version is too oldSven Verdoolaege, Jun 22, 2007
  2. Junio C HamanoJun 23, 2007
  3. Sven VerdoolaegeJun 23, 2007
  4. Junio C HamanoJun 23, 2007
  5. Sven VerdoolaegeJun 23, 2007

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.