This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d3ab86b
)
Adds additional tests with undef for smartmatch.
author
Yuval Kogman
<nothingmuch@woobling.org>
Sun, 1 Nov 2009 00:02:00 +0000
(19:02 -0500)
committer
Steve Peters
<steve@fisharerojo.org>
Sun, 1 Nov 2009 00:02:00 +0000
(19:02 -0500)
Updated plan count missing in the original patch.
t/op/smartmatch.t
patch
|
blob
|
blame
|
history
diff --git
a/t/op/smartmatch.t
b/t/op/smartmatch.t
index
33836b3
..
117fd4e
100644
(file)
--- a/
t/op/smartmatch.t
+++ b/
t/op/smartmatch.t
@@
-73,7
+73,7
@@
my %keyandmore = map { $_ => 0 } @keyandmore;
my %fooormore = map { $_ => 0 } @fooormore;
# Load and run the tests
-plan tests => 3
22
;
+plan tests => 3
35
;
while (<DATA>) {
SKIP: {
@@
-483,3
+483,18
@@
__DATA__
@nums { 1, '', 2, '' }
@nums { 1, '', 12, '' }
! @nums { 11, '', 12, '' }
+
+# UNDEF
+! 3 undef
+! 1 undef
+! [] undef
+! {} undef
+! \%::main undef
+! [1,2] undef
+! %hash undef
+! @nums undef
+! "foo" undef
+! "" undef
+! !1 undef
+! \&foo undef
+! sub { } undef