From 00c1390f3fd32e7cc0959bd9d47ee28d14ef7e42 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Wed, 31 Aug 2011 21:59:40 +0200 Subject: Make switchC.t pass if the environment variable PERL_UNICODE contains "S" (actually doing so the quick way, by skipping the last test, that tests for -CS on the shebang line) --- t/run/switchC.t | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 't/run') diff --git a/t/run/switchC.t b/t/run/switchC.t index 5223b001c8..b1a243c99f 100644 --- a/t/run/switchC.t +++ b/t/run/switchC.t @@ -28,7 +28,7 @@ like( $r, qr/^$b(?:\r?\n)?$/s, '-CO: no warning on UTF-8 output' ); SKIP: { if (exists $ENV{PERL_UNICODE} && ($ENV{PERL_UNICODE} eq "" || $ENV{PERL_UNICODE} =~ /[SO]/)) { - skip(qq[cannot test with PERL_UNICODE locale "" or /[SO]/], 1); + skip(qq[cannot test with PERL_UNICODE "" or /[SO]/], 1); } $r = runperl( switches => [ '-CI', '-w' ], prog => 'print ord()', @@ -96,8 +96,13 @@ $r = runperl( switches => [ '-CA', '-w' ], like( $r, qr/^Too late for "-CS" option at -e line 1\.$/s, '#!perl -C with different -C on command line' ); -$r = runperl( switches => [ '-w' ], - progs => [ '#!perl -CS', 'print chr(256)' ], - stderr => 1, ); -like( $r, qr/^Too late for "-CS" option at -e line 1\.$/s, - '#!perl -C but not command line' ); +SKIP: { + if (exists $ENV{PERL_UNICODE} && $ENV{PERL_UNICODE} =~ /S/) { + skip(qq[cannot test with PERL_UNICODE including "S"], 1); + } + $r = runperl( switches => [ '-w' ], + progs => [ '#!perl -CS', 'print chr(256)' ], + stderr => 1, ); + like( $r, qr/^Too late for "-CS" option at -e line 1\.$/s, + '#!perl -C but not command line' ); +} -- cgit v1.2.1