From: Yuval Kogman Date: Sun, 1 Nov 2009 00:02:00 +0000 (-0500) Subject: Adds additional tests with undef for smartmatch. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=be99ef1a1b51cea36c857c0e89fe4bad505a3eb2;p=p5sagit%2Fp5-mst-13.2.git Adds additional tests with undef for smartmatch. Updated plan count missing in the original patch. --- diff --git a/t/op/smartmatch.t b/t/op/smartmatch.t index 33836b3..117fd4e 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 () { 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