Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add a couple of tests for RT 121990
  • Loading branch information
perlpilot committed Jul 30, 2014
1 parent 5b6b146 commit d5bf9b7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion S32-temporal/DateTime.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 217;
plan 219;

my $orwell = DateTime.new(year => 1984);

Expand Down Expand Up @@ -596,4 +596,14 @@ is DateTime.now.Date, Date.today, 'coercion to Date';
'subtracting 3 weeks, overflowing to years';
}

# RT #121990 Smartmatch against a Date
{
my $now = DateTime.now;
my $today = Date.today;
my $not-now = ds('1971-10-28T10:45:00');

ok $now ~~ $today, "positive smartmatch against a Date";
ok $not-now !~~ $today, "negative smartmatch against a Date";
}

done;

0 comments on commit d5bf9b7

Please sign in to comment.