summaryrefslogtreecommitdiff
path: root/t/comp
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-11-10 09:11:26 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-11-10 09:11:26 +0000
commitfd7808cb43ac6038cce4f46f2e83c3042efbf142 (patch)
tree7b3becf70dae3d64a91a866f7a0a5059ceee0e74 /t/comp
parent0a87c45925ff377a5a12eedc88c116133919463d (diff)
downloadperl-fd7808cb43ac6038cce4f46f2e83c3042efbf142.tar.gz
Add tests for two untested syntax error messages about \N
p4raw-id: //depot/perl@26070
Diffstat (limited to 't/comp')
-rw-r--r--t/comp/parser.t9
1 files changed, 8 insertions, 1 deletions
diff --git a/t/comp/parser.t b/t/comp/parser.t
index 645e6e21ca..bbc3c837cd 100644
--- a/t/comp/parser.t
+++ b/t/comp/parser.t
@@ -9,7 +9,7 @@ BEGIN {
}
require "./test.pl";
-plan( tests => 54 );
+plan( tests => 56 );
eval '%@x=0;';
like( $@, qr/^Can't modify hash dereference in repeat \(x\)/, '%@x=0' );
@@ -23,6 +23,13 @@ eval q/"\x{"/;
like( $@, qr/^Missing right brace on \\x/,
'syntax error in string, used to dump core' );
+eval q/"\N{"/;
+like( $@, qr/^Missing right brace on \\N/,
+ 'syntax error in string with incomplete \N' );
+eval q/"\Nfoo"/;
+like( $@, qr/^Missing braces on \\N/,
+ 'syntax error in string with incomplete \N' );
+
eval "a.b.c.d.e.f;sub";
like( $@, qr/^Illegal declaration of anonymous subroutine/,
'found by Markov chain stress testing' );