diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-10-09 23:43:16 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-10-09 23:43:16 +0000 |
commit | 7bbb0251073a77c17bc1102da053cd50c26c0e81 (patch) | |
tree | e130c185782a5c1ddad82208a55283eb9325b189 /t/pragma | |
parent | 9114b07188664b459df71eeae70be5619f29b102 (diff) | |
download | perl-7bbb0251073a77c17bc1102da053cd50c26c0e81.tar.gz |
Make eq work again with utf8 (disabling the upgrading
should no more be necessary since the copies of the
scalars are upgraded, not the scalars themselves).
Takes care of ID 20001009.001. (The claimed length()
bug in 20001009.001 seems bogus to me.)
p4raw-id: //depot/perl@7182
Diffstat (limited to 't/pragma')
-rwxr-xr-x | t/pragma/utf8.t | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/t/pragma/utf8.t b/t/pragma/utf8.t index 95deee0731..fd1abbb11c 100755 --- a/t/pragma/utf8.t +++ b/t/pragma/utf8.t @@ -10,7 +10,7 @@ BEGIN { } } -print "1..68\n"; +print "1..70\n"; my $test = 1; @@ -20,6 +20,12 @@ sub ok { print "ok $test\n"; } +sub nok { + my ($got,$expect) = @_; + print "# expected not [$expect], got [$got]\nnot " if $got eq $expect; + print "ok $test\n"; +} + sub ok_bytes { use bytes; my ($got,$expect) = @_; @@ -27,6 +33,12 @@ sub ok_bytes { print "ok $test\n"; } +sub nok_bytes { + use bytes; + my ($got,$expect) = @_; + print "# expected not [$expect], got [$got]\nnot " if $got eq $expect; + print "ok $test\n"; +} { use utf8; @@ -310,3 +322,10 @@ sub ok_bytes { ok "@a", "1234 2345"; $test++; # 68 } +{ + my($a,$b); + { use bytes; $a = "\xc3\xa4"; } + { use utf8; $b = "\xe4"; } + { use bytes; ok_bytes $a, $b; $test++; } # 69 + { use utf8; nok $a, $b; $test++; } # 70 +} |