File: 31-hints.t

package info (click to toggle)
libindirect-perl 0.39-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 440 kB
  • sloc: perl: 3,166; ansic: 1,359; makefile: 8
file content (24 lines) | stat: -rw-r--r-- 548 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!perl -T

use strict;
use warnings;

use Test::More tests => 1;

SKIP: {
 skip 'This fails on perl 5.11.x even without using indirect' => 1
                                              if "$]" >= 5.011 and "$]" < 5.012;
 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';
}