summaryrefslogtreecommitdiff
path: root/t/run
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-03-02 13:34:13 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-03-02 13:34:13 +0000
commit06e66572fd5541df0d1349cac2b404c3b9e446ee (patch)
tree0930177519678f5a1dd34796e442ca89f1a91c98 /t/run
parent97edce3fcdc8a02187aed95f7b6f4a46eb120a6e (diff)
downloadperl-06e66572fd5541df0d1349cac2b404c3b9e446ee.tar.gz
The -CI cannot be easily tested under UTF-8 locale with
the t/test.pl (the 'stdin' data gets doubly UTF-8-ied). Also other small tweaks in the -C neighbourhood. p4raw-id: //depot/perl@18799
Diffstat (limited to 't/run')
-rw-r--r--t/run/switchC.t17
1 files changed, 12 insertions, 5 deletions
diff --git a/t/run/switchC.t b/t/run/switchC.t
index 9283fa879b..ba17cb91c1 100644
--- a/t/run/switchC.t
+++ b/t/run/switchC.t
@@ -25,11 +25,18 @@ $r = runperl( switches => [ '-CO', '-w' ],
stderr => 1 );
is( $r, "\xC4\x80", '-CO: no warning on UTF-8 output' );
-$r = runperl( switches => [ '-CI', '-w' ],
- prog => 'print ord(<STDIN>)',
- stderr => 1,
- stdin => chr(256) );
-is( $r, 256, '-CI: read in UTF-8 output' );
+SKIP: {
+ for my $l (qw(LC_ALL LC_CTYPE LANG)) {
+ skip("cannot easily test under UTF-8 locale", 1)
+ if $ENV{$l} =~ /utf-?8/i;
+ }
+ $r = runperl( switches => [ '-CI', '-w' ],
+ prog => 'print ord(<STDIN>)',
+ stderr => 1,
+ verbose => 1,
+ stdin => "\xC4\x80" );
+ is( $r, 256, '-CI: read in UTF-8 input' );
+}
$r = runperl( switches => [ '-CE', '-w' ],
prog => 'warn chr(256), qq(\n)',