From fa37cf1c06839c5d737c32b1fda4224f3217a394 Mon Sep 17 00:00:00 2001 From: doy Date: Mon, 2 Feb 2009 00:07:38 -0500 Subject: add failing test --- t/001-basic-matching.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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), -- cgit v1.2.3