summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordoy <doy@tozt.net>2009-02-02 00:07:38 -0500
committerdoy <doy@tozt.net>2009-02-02 00:07:38 -0500
commitfa37cf1c06839c5d737c32b1fda4224f3217a394 (patch)
tree9bebe1d7507352cbceb787e42de2fb1c8fd17691
parente697a64d5152f4d674df32344b4bbe92f2b22b23 (diff)
downloadmoosex-role-matcher-fa37cf1c06839c5d737c32b1fda4224f3217a394.tar.gz
moosex-role-matcher-fa37cf1c06839c5d737c32b1fda4224f3217a394.zip
add failing test
-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),