Skip to content

Commit fc746df

Browse files
Sven Verdoolaegegitster
authored andcommitted
t9500: skip gitweb tests if perl version is too old
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ee4fd1a commit fc746df

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ gitweb_run () {
6060

6161
. ./test-lib.sh
6262

63+
perl -MEncode -e 'decode_utf8("", Encode::FB_CROAK)' >/dev/null 2>&1 || {
64+
test_expect_success 'skipping gitweb tests, perl version is too old' :
65+
test_done
66+
exit
67+
}
68+
6369
gitweb_init
6470

6571
# ----------------------------------------------------------------------

0 commit comments

Comments
 (0)