diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-03-17 15:11:05 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-03-17 15:11:05 +0100 |
commit | 203d1e89388de309200a88815a95943bd5b59d86 (patch) | |
tree | 334b8e3376dca0830ba3a3f24fddc993594bf84a /t | |
parent | 6ac83b6344167664acd39ef656560e3f3bbc361c (diff) | |
download | perl-203d1e89388de309200a88815a95943bd5b59d86.tar.gz |
Test that in "~~ sub", the sub is not called on empty hashes and arrays
Diffstat (limited to 't')
-rw-r--r-- | t/op/smartmatch.t | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/t/op/smartmatch.t b/t/op/smartmatch.t index 7736269f6b..c480e0e14d 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 |