summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--t/001-basic-matching.t4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/001-basic-matching.t b/t/001-basic-matching.t
index e45b43f..07bbe66 100644
--- a/t/001-basic-matching.t
+++ b/t/001-basic-matching.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 8;
+use Test::More tests => 9;
package Foo;
use Moose;
@@ -23,6 +23,8 @@ ok($foo->match(b => sub { length == 3 }),
ok($foo->match(a => 'foo', b => qr/a/, c => sub { substr($_, 2) eq 'z' }),
'combined matching works');
$foo = Foo->new(a => 'foo');
+ok($foo->match(b => sub { !$_ }),
+ 'subroutine matching against undef works');
ok($foo->match(a => 'foo', b => undef),
'matching against undef works');
ok($foo->match(a => 'foo', d => undef),