From: Rafael Garcia-Suarez Date: Thu, 20 Apr 2006 12:59:50 +0000 (+0000) Subject: New test for the "Assignment to both a list and a scalar" error, X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a6a8bb4958b2d1dd5e9931085ebd3833ac8c5991;p=p5sagit%2Fp5-mst-13.2.git New test for the "Assignment to both a list and a scalar" error, suggested by Stephen McCamant p4raw-id: //depot/perl@27912 --- diff --git a/t/comp/parser.t b/t/comp/parser.t index 0532ab3..439dc71 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' );