6 skip_all_without_perlio();
11 # 6 == @char; paired tests inside 3 nested loops,
12 # plus extra pair of tests in a loop, plus extra pair of tests.
13 plan tests => 6 ** 3 * 2 + 6 * 2 + 2;
15 my @char = (pack('U*', 0x40), "\x{4E00}", "\x{4E9C}", "\x{4E02}",
16 "\x{FF69}", "\x{304B}");
20 for my $start (@char) {
22 my $string = $start.$end;
23 my ($expect, $return);
26 # The answer will always be a length in utf8, even if the
27 # scalar was encoded with a different length
28 $return = length ($end . "\x{100}") - 1;
33 is (chomp ($string), $return);
34 is ($string, $expect); # "$enc \$/=$rs $start $end"
37 # chomp should not stringify references unless it decides to modify
42 is (ref($_), "ARRAY", "chomp ref (no modify)");
45 $/ = ")"; # the last char of something like "ARRAY(0x80ff6e4)"
48 ok (!ref($_), "chomp ref (modify)");