projects
/
p5sagit/p5-mst-13.2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
6ac83b6
)
Test that in "~~ sub", the sub is not called on empty hashes and arrays
Rafael Garcia-Suarez [Tue, 17 Mar 2009 14:11:05 +0000 (15:11 +0100)]
t/op/smartmatch.t
patch
|
blob
|
blame
|
history
diff --git
a/t/op/smartmatch.t
b/t/op/smartmatch.t
index
7736269
..
c480e0e
100644
(file)
--- 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