#!./perl
BEGIN {
chdir 't' if -d 't';
} else {
}
}
$| = 1;
use warnings;
use strict;
use Config;
print "1..32\n";
use B::Deparse;
my $i=1;
print "ok " . $i++ . "\n";
# Tell B::Deparse about our ambient pragmas
hint_bits => $hint_bits,
'$[' => 0 + $[
);
}
$/ = "\n####\n";
while (<DATA>) {
s/#.*$//mg;
if (/(.*)\n>>>>\n(.*)/s) {
}
else {
}
if ($@) {
print "not ok " . $i++ . "\n";
print "# $@";
}
else {
do {
$regex =~ s/\s+/\s+/g;
};
print "# EXPECTED:\n";
$regex =~ s/^/# /mg;
print "\n# GOT: \n";
$deparsed =~ s/^/# /mg;
}
}
}
print "ok " . $i++ . "\n";
$a = 0;
print "not " if "{\n (-1) ** \$a;\n}"
print "ok " . $i++ . "\n";
print "ok " . $i++ . "\n";
my $a;
$b = <<'EOF';
BEGIN { $^W = 1; }
chomp $_;
'???';
}
}
$1/ if $Is_MacOS;
print "ok " . $i++ . "\n";
# 2
1;
####
# 3
{
'???';
2;
}
####
# 4
my $test;
>>>>
my $test;
####
# 5
-((1, 2) x 2);
####
# 6
{
my $x;
}
;
}
####
# 7
{
my $x;
}
;
}
####
# 8
{
my $x;
}
;
}
####
# 9
{
234;
}
continue {
123;
}
####
# 10
my $x;
print $main::x;
####
# 11
my @x;
print $main::x[1];
####
# 12
my %x;
####
# 13
my $foo;
####
# 14
####
# 15
s/x/'y';/e;
####
# 16 - various lypes of loop
{ my $x; }
####
# 17
while (1) { my $k; }
####
# 18
my ($x,@a);
$x=1 for @a;
>>>>
my($x, @a);
foreach $_ (@a) {
$x = 1;
}
####
# 19
for (my $i = 0; $i < 2;) {
my $z = 1;
}
####
# 20
for (my $i = 0; $i < 2; ++$i) {
my $z = 1;
}
####
# 21
for (my $i = 0; $i < 2; ++$i) {
my $z = 1;
}
####
# 22
my $i;
while ($i) { my $z = 1; } continue { $i = 99; }
####
# 23
foreach $i (1, 2) {
my $z = 1;
}
####
# 24
my $i;
foreach $i (1, 2) {
my $z = 1;
}
####
# 25
my $i;
foreach my $i (1, 2) {
my $z = 1;
}
####
# 26
foreach my $i (1, 2) {
my $z = 1;
}
####
# 27
my $z = 1;
}
####
# 28
my $i;
my $z = 1;
}