This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #123802] Assertion failure with /$0{}/
[perl5.git] / t / op / lex.t
index dffd0b2..06d069a 100644 (file)
@@ -7,7 +7,7 @@ use warnings;
 
 BEGIN { chdir 't' if -d 't'; require './test.pl'; }
 
 
 BEGIN { chdir 't' if -d 't'; require './test.pl'; }
 
-plan(tests => 20);
+plan(tests => 21);
 
 {
     no warnings 'deprecated';
 
 {
     no warnings 'deprecated';
@@ -177,3 +177,11 @@ fresh_perl_is(
    { stderr => 1 },
   '"@{" [perl #123712]'
 );
    { stderr => 1 },
   '"@{" [perl #123712]'
 );
+
+fresh_perl_is(
+  '/$0{}/',
+  'syntax error at - line 1, near "{}"' . "\n" .
+  "Execution of - aborted due to compilation errors.\n",
+   { stderr => 1 },
+  '/$0{}/ with no newline [perl #123712]'
+);