{"thread":{"id":"8682","subject":"[PATCH] t9500: skip gitweb tests if perl version is too old","startedAt":"2007-06-22T15:49:08Z","lastAt":"2007-06-23T10:51:19Z","messageCount":5,"participants":["Sven Verdoolaege","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"45576","messageId":"20070622154908.GA7946MdfPADPa@greensroom.kotnet.org","threadId":"8682","inReplyTo":null,"subject":"[PATCH] t9500: skip gitweb tests if perl version is too old","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2007-06-22T15:49:08Z","receivedAt":"2007-06-22T15:49:08Z","isPatch":true,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"gitweb calls Encode::decode_utf8 with two arguments,\nbut old versions of perl only allow this function to be called\nwith one argument.  Even older versions of perl do not even\nhave an Encode module.\n\nSigned-off-by: Sven Verdoolaege <skimo@kotnet.org>\n---\n t/t9500-gitweb-standalone-no-errors.sh |    6 ++++++\n 1 files changed, 6 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh\nindex 44ae503..d948724 100755\n--- a/t/t9500-gitweb-standalone-no-errors.sh\n+++ b/t/t9500-gitweb-standalone-no-errors.sh\n@@ -60,6 +60,12 @@ gitweb_run () {\n \n . ./test-lib.sh\n \n+perl -MEncode -e 'decode_utf8(\"\", Encode::FB_CROAK)' >/dev/null 2>&1 || {\n+    test_expect_success 'skipping gitweb tests, perl version is too old' :\n+    test_done\n+    exit\n+}\n+\n gitweb_init\n \n # ----------------------------------------------------------------------\n-- \n1.5.2.2.249.g45fd\n"},{"id":"45594","messageId":"7vps3n89mb.fsf@assigned-by-dhcp.pobox.com","threadId":"8682","inReplyTo":"20070622154908.GA7946MdfPADPa@greensroom.kotnet.org","subject":"Re: [PATCH] t9500: skip gitweb tests if perl version is too old","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-06-23T06:31:40Z","receivedAt":"2007-06-23T06:31:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sven Verdoolaege <skimo@kotnet.org> writes:\n\n> gitweb calls Encode::decode_utf8 with two arguments,\n> but old versions of perl only allow this function to be called\n> with one argument.  Even older versions of perl do not even\n> have an Encode module.\n>\n> Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>\n> ---\n>  t/t9500-gitweb-standalone-no-errors.sh |    6 ++++++\n>  1 files changed, 6 insertions(+), 0 deletions(-)\n>\n> diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh\n> index 44ae503..d948724 100755\n> --- a/t/t9500-gitweb-standalone-no-errors.sh\n> +++ b/t/t9500-gitweb-standalone-no-errors.sh\n> @@ -60,6 +60,12 @@ gitweb_run () {\n>  \n>  . ./test-lib.sh\n>  \n> +perl -MEncode -e 'decode_utf8(\"\", Encode::FB_CROAK)' >/dev/null 2>&1 || {\n> +    test_expect_success 'skipping gitweb tests, perl version is too old' :\n> +    test_done\n> +    exit\n> +}\n> +\n\nHmph.  Even something silly like:\n\n\tperl -MEncode -e 'decode_utf8(\"\", Encode::FB_CLUCK)'\n\nseem to succeed for me with 5.8.8.\n\nMaybe you would want \"perl -w\" there instead?\n"},{"id":"45595","messageId":"20070623085751.GX955MdfPADPa@greensroom.kotnet.org","threadId":"8682","inReplyTo":"7vps3n89mb.fsf@assigned-by-dhcp.pobox.com","subject":"Re: [PATCH] t9500: skip gitweb tests if perl version is too old","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2007-06-23T08:57:51Z","receivedAt":"2007-06-23T08:57:51Z","isPatch":true,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"On Fri, Jun 22, 2007 at 11:31:40PM -0700, Junio C Hamano wrote:\n> Sven Verdoolaege <skimo@kotnet.org> writes:\n> > +perl -MEncode -e 'decode_utf8(\"\", Encode::FB_CROAK)' >/dev/null 2>&1 || {\n> > +    test_expect_success 'skipping gitweb tests, perl version is too old' :\n> > +    test_done\n> > +    exit\n> > +}\n> > +\n> \n> Hmph.  Even something silly like:\n> \n> \tperl -MEncode -e 'decode_utf8(\"\", Encode::FB_CLUCK)'\n> \n> seem to succeed for me with 5.8.8.\n> \n\nMaybe I'm missing something, but it's supposed to succeed\nfor perl versions that are recent enough.\n\n\nI get\n\nbash-3.00$ perl -MEncode -e 'decode_utf8(\"\", Encode::FB_CROAK)'\nToo many arguments for Encode::decode_utf8 at -e line 1, at end of line\nExecution of -e aborted due to compilation errors.\nbash-3.00$ perl --version\n\nThis is perl, v5.8.0 built for i686-linux-thread-multi\n\nCopyright 1987-2002, Larry Wall\n\nPerl may be copied only under the terms of either the Artistic License or the\nGNU General Public License, which may be found in the Perl 5 source kit.\n\nComplete documentation for Perl, including FAQ lists, should be found on\nthis system using `man perl' or `perldoc perl'.  If you have access to the\nInternet, point your browser at http://www.perl.com/, the Perl Home Page.\n\n(See also http://article.gmane.org/gmane.comp.version-control.git/50354)\n\nskimo\n"},{"id":"45598","messageId":"7vps3n3rm7.fsf@assigned-by-dhcp.pobox.com","threadId":"8682","inReplyTo":"20070623085751.GX955MdfPADPa@greensroom.kotnet.org","subject":"Re: [PATCH] t9500: skip gitweb tests if perl version is too old","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-06-23T10:14:08Z","receivedAt":"2007-06-23T10:14:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sven Verdoolaege <skimo@kotnet.org> writes:\n\n> On Fri, Jun 22, 2007 at 11:31:40PM -0700, Junio C Hamano wrote:\n>> Sven Verdoolaege <skimo@kotnet.org> writes:\n>> > +perl -MEncode -e 'decode_utf8(\"\", Encode::FB_CROAK)' >/dev/null 2>&1 || {\n>> > +    test_expect_success 'skipping gitweb tests, perl version is too old' :\n>> > +    test_done\n>> > +    exit\n>> > +}\n>> > +\n>> \n>> Hmph.  Even something silly like:\n>> \n>> \tperl -MEncode -e 'decode_utf8(\"\", Encode::FB_CLUCK)'\n>> \n>> seem to succeed for me with 5.8.8.\n>> \n>\n> Maybe I'm missing something, but it's supposed to succeed\n> for perl versions that are recent enough.\n\nWell, \"Encode::FB_CLUCK\" is a bogus symbol even in recent Perl.\nIOW, the tested function does not seem to care if I give\nwhatever garbage as the second parameter.\n\nBut I guess you are only interested if the perl used to run\ngitweb barfs with that two parameter, so the original check\nwould be the right way.\n\nWill apply, but I am about to go to bed, so it will be\ntomorrow.\n\nThanks.\n"},{"id":"45600","messageId":"20070623105118.GY955MdfPADPa@greensroom.kotnet.org","threadId":"8682","inReplyTo":"7vps3n3rm7.fsf@assigned-by-dhcp.pobox.com","subject":"Re: [PATCH] t9500: skip gitweb tests if perl version is too old","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2007-06-23T10:51:19Z","receivedAt":"2007-06-23T10:51:19Z","isPatch":true,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"On Sat, Jun 23, 2007 at 03:14:08AM -0700, Junio C Hamano wrote:\n> Well, \"Encode::FB_CLUCK\" is a bogus symbol even in recent Perl.\n> IOW, the tested function does not seem to care if I give\n> whatever garbage as the second parameter.\n> \n> But I guess you are only interested if the perl used to run\n> gitweb barfs with that two parameter, so the original check\n> would be the right way.\n\nIndeed.  gitweb doesn't use FB_CLUCK and if it did, we would\nwant to know about it (and not skip the tests).\n\nskimo\n"}]}