summaryrefslogtreecommitdiff
path: root/t/comp
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-04-20 12:59:50 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-04-20 12:59:50 +0000
commita6a8bb4958b2d1dd5e9931085ebd3833ac8c5991 (patch)
tree4a3c4c5430c3bbac9acba00c0b92a8b83cbfa95e /t/comp
parent9e1379522064653a18f9869238cf993de17f1960 (diff)
downloadperl-a6a8bb4958b2d1dd5e9931085ebd3833ac8c5991.tar.gz
New test for the "Assignment to both a list and a scalar" error,
suggested by Stephen McCamant p4raw-id: //depot/perl@27912
Diffstat (limited to 't/comp')
-rw-r--r--t/comp/parser.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/comp/parser.t b/t/comp/parser.t
index 0532ab3ba2..439dc71a1d 100644
--- a/t/comp/parser.t
+++ b/t/comp/parser.t
@@ -9,7 +9,7 @@ BEGIN {
}
require "./test.pl";
-plan( tests => 58 );
+plan( tests => 59 );
eval '%@x=0;';
like( $@, qr/^Can't modify hash dereference in repeat \(x\)/, '%@x=0' );
@@ -203,3 +203,7 @@ eval q{ foo::$bar };
like( $@, qr/Bad name after foo::/, 'Bad name after foo::' );
eval q{ foo''bar };
like( $@, qr/Bad name after foo'/, 'Bad name after foo\'' );
+
+# test for ?: context error
+eval q{($a ? $x : ($y)) = 5};
+like( $@, qr/Assignment to both a list and a scalar/, 'Assignment to both a list and a scalar' );