summaryrefslogtreecommitdiff
path: root/t/run
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-03-10 21:44:12 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-03-10 21:44:12 +0000
commita4c0dc87024a3e2a076df79e21b4fe3438f88e49 (patch)
treefd942784cdbf87144d0235514003777b3088bf57 /t/run
parent059ca955ed31579c1bd941d140a77868e99c2fdf (diff)
downloadperl-a4c0dc87024a3e2a076df79e21b4fe3438f88e49.tar.gz
VMS has an extra \n at the end, and I assume Windows has \r\n.
p4raw-id: //depot/perl@18899
Diffstat (limited to 't/run')
-rw-r--r--t/run/switchC.t13
1 files changed, 6 insertions, 7 deletions
diff --git a/t/run/switchC.t b/t/run/switchC.t
index c3cc4033a7..0f8f16a6ce 100644
--- a/t/run/switchC.t
+++ b/t/run/switchC.t
@@ -23,7 +23,7 @@ END { unlink @tmpfiles }
$r = runperl( switches => [ '-CO', '-w' ],
prog => 'print chr(256)',
stderr => 1 );
-is( $r, "\xC4\x80", '-CO: no warning on UTF-8 output' );
+like( $r, qr/^\xC4\x80(?:\r?\n)?$/s, '-CO: no warning on UTF-8 output' );
SKIP: {
if (exists $ENV{PERL_UNICODE} &&
@@ -34,30 +34,29 @@ SKIP: {
prog => 'print ord(<STDIN>)',
stderr => 1,
stdin => "\xC4\x80" );
- is( $r, 256, '-CI: read in UTF-8 input' );
+ like( $r, qr/^256(?:\r?\n)?$/s, '-CI: read in UTF-8 input' );
}
$r = runperl( switches => [ '-CE', '-w' ],
prog => 'warn chr(256), qq(\n)',
stderr => 1 );
-chomp $r;
-is( $r, "\xC4\x80", '-CE: UTF-8 stderr' );
+like( $r, qr/^\xC4\x80(?:\r?\n)?$/s, '-CE: UTF-8 stderr' );
$r = runperl( switches => [ '-Co', '-w' ],
prog => 'open(F, q(>out)); print F chr(256); close F',
stderr => 1 );
-is( $r, '', '-Co: auto-UTF-8 open for output' );
+like( $r, qr/^$/s, '-Co: auto-UTF-8 open for output' );
push @tmpfiles, "out";
$r = runperl( switches => [ '-Ci', '-w' ],
prog => 'open(F, q(<out)); print ord(<F>); close F',
stderr => 1 );
-is( $r, 256, '-Ci: auto-UTF-8 open for input' );
+like( $r, qr/^256(?:\r?\n)?$/s, '-Ci: auto-UTF-8 open for input' );
$r = runperl( switches => [ '-CA', '-w' ],
prog => 'print ord shift',
stderr => 1,
args => [ chr(256) ] );
-is( $r, 256, '-CA: @ARGV' );
+like( $r, qr/^256(?:\r?\n)?$/s, '-CA: @ARGV' );