6
use Test::More tests => 7;
9
BEGIN { use_ok('Data::ICal::Entry::Todo') }
11
my $todo = Data::ICal::Entry::Todo->new;
12
isa_ok($todo, 'Data::ICal::Entry::Todo');
14
my $hundreds_of_characters = "X" x 300;
16
is(length $hundreds_of_characters, 300);
17
cmp_ok(length $hundreds_of_characters, '>', 75, "the summary is bigger than the suggested line-wrap");
19
$todo->add_property(summary => $hundreds_of_characters);
21
lacks_string($todo->as_string, $hundreds_of_characters, "the long string isn't there");
22
unlike_string($todo->as_string, qr/.{76}/, "no lines are too long");
25
like_string($todo->as_string(fold => 0), qr/.{300}/, "no lines are too long".$todo->as_string(fold=>0));