]> git.vpit.fr Git - perl/modules/indirect.git/commitdiff
Test that indirect does not vivify entries in %^H
authorVincent Pit <vince@profvince.com>
Sun, 17 Jul 2011 22:31:54 +0000 (00:31 +0200)
committerVincent Pit <vince@profvince.com>
Sun, 17 Jul 2011 22:45:31 +0000 (00:45 +0200)
MANIFEST
t/31-hints.t [new file with mode: 0644]

index 65d9e24dc282c3defb19cbe14fc49aa7621b9669..fba7e0e8baa6c4c3ba52954333038176dc8ebb29 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -17,6 +17,7 @@ t/21-bad.t
 t/22-bad-mixed.t
 t/23-bad-notaint.t
 t/30-scope.t
+t/31-hints.t
 t/40-threads.t
 t/41-threads-teardown.t
 t/45-memory.t
diff --git a/t/31-hints.t b/t/31-hints.t
new file mode 100644 (file)
index 0000000..0b271b4
--- /dev/null
@@ -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';
+}