From: Rafael Garcia-Suarez Date: Tue, 17 Mar 2009 14:11:05 +0000 (+0100) Subject: Test that in "~~ sub", the sub is not called on empty hashes and arrays X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=203d1e89388de309200a88815a95943bd5b59d86;p=p5sagit%2Fp5-mst-13.2.git Test that in "~~ sub", the sub is not called on empty hashes and arrays --- diff --git a/t/op/smartmatch.t b/t/op/smartmatch.t index 7736269..c480e0e 100644 --- a/t/op/smartmatch.t +++ b/t/op/smartmatch.t @@ -220,8 +220,12 @@ __DATA__ @ undef \&fatal @ 1 \&fatal @ [1] \&fatal +@ {a=>1} \&fatal @ "foo" \&fatal @ qr// \&fatal +# sub is not called on empty hashes / arrays + [] \&fatal + +{} \&fatal # - null-prototyped subs ! undef \&FALSE