Skip to content

Commit

Permalink
make the string eval tests test the right thing
Browse files Browse the repository at this point in the history
  • Loading branch information
doy committed Feb 20, 2012
1 parent e07d5a6 commit bf8f25b
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions t/exceptions.t
Expand Up @@ -75,31 +75,35 @@ EVAL
}

{
my $i = 0;
my $i;
BEGIN { $i = 0 }
{
eval <<'EVAL';
BEGIN { after_runtime 2, sub { $i++ } }
is($i, 0);
BEGIN {
eval <<'EVAL';
BEGIN { after_runtime 2, sub { $i++ } }
is($i, 0);
EVAL
ok(!$@);
ok(!$@);
}
is($i, 0);
}
local $TODO = "doesn't cross string eval boundaries properly?";
is($i, 1);
}

{
my $i = 0;
my $i;
BEGIN { $i = 0 }
{
eval <<'EVAL';
BEGIN { after_runtime 2, sub { $i++ } }
is($i, 0);
die "foo\n";
BEGIN {
eval <<'EVAL';
BEGIN { after_runtime 2, sub { $i++ } }
is($i, 0);
die "foo\n";
EVAL
is($@, "foo\n");
is($@, "foo\n");
}
is($i, 0);
}
local $TODO = "doesn't cross string eval boundaries properly?";
is($i, 1);
}

Expand Down

0 comments on commit bf8f25b

Please sign in to comment.