#!perl
# minimal and temporary tests, pending real duration spectest from Sah
use 5.010;
use strict;
use warnings;
use Test::More 0.96;
use Test::Data::Sah qw(test_sah_cases);
plan skip_all => "DateTime not available" unless eval { require DateTime; 1 };
# just testing that bool in perl can accept numbers and strings
my @tests = (
{schema=>["duration"], input=>"P1Y2M", valid=>1},
{schema=>["duration"], input=>"x", valid=>0},
{schema=>["duration"], input=>"1Y2M", valid=>0},
{schema=>["duration"], input=>DateTime::Duration->new(years=>1, months=>2), valid=>1},
);
test_sah_cases(\@tests);
done_testing();