From: Inaba Hiroto Date: Sun, 10 Dec 2000 05:53:21 +0000 (+0900) Subject: Re: Additional patch for UTF8-keys (Re: perl@8016) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ca9dc00c559bb16eae63de552c549a40c3f17e5b;p=p5sagit%2Fp5-mst-13.2.git Re: Additional patch for UTF8-keys (Re: perl@8016) Message-ID: <3A329BC0.15E8BFF9@st.rim.or.jp> Tests for #8056. p4raw-id: //depot/perl@8057 --- diff --git a/t/op/each.t b/t/op/each.t index 4a00a1e..35792ab 100755 --- a/t/op/each.t +++ b/t/op/each.t @@ -1,6 +1,6 @@ #!./perl -print "1..20\n"; +print "1..24\n"; $h{'abc'} = 'ABC'; $h{'def'} = 'DEF'; @@ -143,3 +143,16 @@ foreach (keys %u) { } } print "ok 20\n"; + +$a = "\xe3\x81\x82"; $A = "\x{3042}"; +%b = ( $a => "non-utf8"); +%u = ( $A => "utf8"); + +print "not " if exists $b{$A}; +print "ok 21\n"; +print "not " if exists $u{$a}; +print "ok 22\n"; +print "#$b{$_}\n" for keys %b; # Used to core dump before change #8056. +print "ok 23\n"; +print "#$u{$_}\n" for keys %u; # Used to core dump before change #8056. +print "ok 24\n";