2012-04-21 14:34:10 -07:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
use Test::More;
|
|
|
|
use DDG::Test::Goodie;
|
|
|
|
|
|
|
|
zci answer_type => 'days_between';
|
|
|
|
zci is_cached => 1;
|
|
|
|
|
|
|
|
ddg_goodie_test(
|
|
|
|
[qw(
|
|
|
|
DDG::Goodie::DaysBetween
|
|
|
|
)],
|
2012-04-21 14:59:02 -07:00
|
|
|
'days between 01/01/2000 01/01/2001' => test_zci('There are 366 days between 01/01/2000 and 01/01/2001.'),
|
|
|
|
'days between 1/1/2000 and 1/1/2001 inclusive' => test_zci('There are 367 days between 1/1/2000 and 1/1/2001, inclusive.'),
|
2012-04-21 16:00:52 -07:00
|
|
|
'daysbetween 03/4/2005 and 11/8/2020' => test_zci('There are 5728 days between 03/4/2005 and 11/8/2020.'),
|
|
|
|
'days_between 3/14/2005 and 1/2/2003' => test_zci('There are 800 days between 3/12/2005 and 1/2/2003.'),
|
2012-04-21 14:34:10 -07:00
|
|
|
);
|
|
|
|
|
|
|
|
done_testing;
|