8 use lib $Bin, "$Bin/t";
16 name => 'timerange basic tests',
17 filter_elements => sub {
18 $_[0]->isa('Org::Element::TimeRange') },
20 * TODO active timeranges
21 <2011-03-23 Wed>--<2011-03-24 Thu>
22 <2011-03-23 >--<2011-03-24 >
23 <2011-03-23 Wed 01:23>--<2011-03-23 Wed 03:59>
26 [2011-03-23 Wed]--[2011-03-24 Thu]
27 [2011-03-23 ]--[2011-03-24 ]
28 [2011-03-23 Wed 01:23]--[2011-03-23 Wed 03:59]
31 [2011-03-22 ]--<2011-03-23 > # mixed active & inactive timestamp
32 <2011-03-22 >--[2011-03-23 ] # mixed active & inactive timestamp
36 test_after_parse => sub {
38 my $doc = $args{result};
39 my $elems = $args{elements};
40 ok( $elems->[0]->ts1->is_active, "tr[0] is_active");
41 ok(!$elems->[3]->ts1->is_active, "tr[3] !is_active");
46 name => 'event duration not allowed in timerange',
47 filter_elements => sub {
48 $_[0]->isa('Org::Element::TimeRange') },
50 <2011-03-23 Wed 11:28-12:00>--<2011-03-24 Thu>
56 name => 'repeater not allowed in timerange',
57 filter_elements => sub {
58 $_[0]->isa('Org::Element::TimeRange') },
60 <2011-03-23 Wed +1w>--<2011-03-24 Thu>