diff options
author | SADAHIRO Tomoyuki <BQW10602@nifty.com> | 2006-05-21 23:00:43 +0900 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-11-03 16:04:48 +0000 |
commit | 6448472a7a0e4a2f91d781fd6991f5f5126d6fbc (patch) | |
tree | df1b476810ab5aea1753a54359a85669ce1c6056 /t/op/index.t | |
parent | e240c90c8379c0167b78b57a96eb176cec0373e0 (diff) | |
download | perl-6448472a7a0e4a2f91d781fd6991f5f5126d6fbc.tar.gz |
replace S_sv_pos_b2u_forwards with utf8_length (was: sv_pos_b2u dislikes the extended UTF-8)
Message-Id: <20060521140011.358D.BQW10602@nifty.com>
p4raw-id: //depot/perl@29201
Diffstat (limited to 't/op/index.t')
-rwxr-xr-x | t/op/index.t | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/t/op/index.t b/t/op/index.t index b7cdfb0958..b384bef445 100755 --- a/t/op/index.t +++ b/t/op/index.t @@ -3,11 +3,11 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; + require './test.pl'; } use strict; -require './test.pl'; -plan( tests => 66 ); +plan( tests => 69 ); my $foo = 'Now is the time for all good men to come to the aid of their country.'; @@ -140,3 +140,18 @@ foreach my $utf8 ('', ', utf-8') { fresh_perl_is($prog, $expect_pos, {}, "\$[ = $arraybase$utf8"); } } + +SKIP: { + skip "UTF-EBCDIC is limited to 0x7fffffff", 3 if ord("A") == 193; + + my $a = "\x{80000000}"; + my $s = $a.'defxyz'; + is(index($s, 'def'), 1, "0x80000000 is a single character"); + + my $b = "\x{fffffffd}"; + my $t = $b.'pqrxyz'; + is(index($t, 'pqr'), 1, "0xfffffffd is a single character"); + + local ${^UTF8CACHE} = -1; + is(index($t, 'xyz'), 4, "0xfffffffd and utf8cache"); +} |