diff options
author | Yuval Kogman <nothingmuch@woobling.org> | 2009-10-31 19:02:00 -0500 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2009-10-31 19:02:00 -0500 |
commit | be99ef1a1b51cea36c857c0e89fe4bad505a3eb2 (patch) | |
tree | d38b73cd0480a7740082f122d96579fd3a1908b5 /t | |
parent | d3ab86beddf03171608c751a0b6585aeb1864b00 (diff) | |
download | perl-be99ef1a1b51cea36c857c0e89fe4bad505a3eb2.tar.gz |
Adds additional tests with undef for smartmatch.
Updated plan count missing in the original patch.
Diffstat (limited to 't')
-rw-r--r-- | t/op/smartmatch.t | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/t/op/smartmatch.t b/t/op/smartmatch.t index 33836b3f4f..117fd4e544 100644 --- 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 => 322; +plan tests => 335; 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 |