X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=blobdiff_plain;f=t%2F31-hints.t;fp=t%2F31-hints.t;h=0b271b4b59bdab20a2ca27d5b65416b96215506c;hp=0000000000000000000000000000000000000000;hb=94eaa9a61ca1429f0cf218ba0e6512f0c0c073aa;hpb=485841aab90380ffecbe0f217eb234a64f69bb25 diff --git a/t/31-hints.t b/t/31-hints.t new file mode 100644 index 0000000..0b271b4 --- /dev/null +++ b/t/31-hints.t @@ -0,0 +1,25 @@ +#!perl -T + +use strict; +use warnings; + +use Test::More tests => 1; + +SKIP: { + skip 'This would require extensive work to be okay with perl 5.8' => 1 + if $] < 5.010; + + local %^H = (a => 1); + + require indirect; + + # Force %^H repopulation with an Unicode match + my $x = "foo"; + utf8::upgrade($x); + $x =~ /foo/i; + + my $hints = join ',', + map { $_, defined $^H{$_} ? $^H{$_} : '(undef)' } + sort keys(%^H); + is $hints, 'a,1', 'indirect does not vivify entries in %^H'; +}