Permalink
Browse files

Add test for RT #115134: [BUG] BEGIN { eval "..." } Confuses Rakudo.

  • Loading branch information...
1 parent 5249f85 commit a7483bec004cf98a4e8fe774e56a42bf28648485 @edwinst edwinst committed Oct 5, 2012
Showing with 17 additions and 0 deletions.
  1. +17 −0 S04-phasers/eval-in-begin.t
View
17 S04-phasers/eval-in-begin.t
@@ -0,0 +1,17 @@
+use v6;
+use Test;
+
+plan 3;
+
+# RT #115134: [BUG] BEGIN { eval "..." } Confuses Rakudo
+# The bug is triggered by the closing brace being directly
+# followed by a newline and the next statement.
+#?rakudo todo 'RT #115134'
+eval_lives_ok(q[BEGIN { eval '0' }
+0], 'eval in BEGIN { ... } followed by newline works');
+
+eval_lives_ok(q[BEGIN { eval '0' };
+0], 'eval in BEGIN { ... } followed by semicolon and newline works');
+
+eval_lives_ok(q[BEGIN { eval '0' };0], 'eval in BEGIN { ... } followed by semicolon works');
+

0 comments on commit a7483be

Please sign in to comment.