This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Get t/uni/gv.t working under minitest
[perl5.git] / t / re / reg_namedcapture.t
CommitLineData
80305961 1#!./perl
80305961
YO
2
3BEGIN {
4 chdir 't' if -d 't';
5 @INC = '../lib';
f977b7bb
NC
6 unless (defined &DynaLoader::boot_DynaLoader) {
7 print "1..0 # Skip: no dynamic loading on miniperl, no Tie::Hash::NamedCapture\n";
8 exit 0;
9 }
80305961
YO
10}
11
02eafbe2 12# WARNING: Do not directly use any modules as part of this test code.
67261566
YO
13# We could get action at a distance that would invalidate the tests.
14
15print "1..2\n";
16
17# This tests whether glob assignment fails to load the tie.
80305961 18*X = *-;
67261566
YO
19'X'=~/(?<X>X)/;
20print eval '*X{HASH}{X} || 1' ? "" :"not ","ok ",++$test,"\n";
21
02eafbe2
DD
22# And since it's a similar case we check %! as well. Note that
23# this can't be done until ../lib/Errno.pm is in place, as the
24# glob hits $!, which needs that module.
67261566
YO
25*Y = *!;
26print 0<keys(%Y) ? "" :"not ","ok ",++$test,"\n";