This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #41484] qr// stack bug
[perl5.git] / t / op / qrstack.t
CommitLineData
c8c13c22
JB
1#!./perl
2
3my $test = 1;
4sub ok {
5 my($ok, $name) = @_;
6
7 # You have to do it this way or VMS will get confused.
8 printf "%s %d%s\n", $ok ? "ok" : "not ok",
9 $test,
10 defined $name ? " - $name" : '';
11
12 printf "# Failed test at line %d\n", (caller)[2] unless $ok;
13
14 $test++;
15 return $ok;
16}
17
18print "1..1\n";
19
20ok(defined [(1)x127,qr//,1]->[127], "qr// should extend the stack properly");
21