File: 06.prop-bad-quote.t

package info (click to toggle)
libdata-ical-perl 0.21%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 388 kB
  • ctags: 247
  • sloc: perl: 3,371; sh: 51; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 598 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/perl -w

use warnings;
use strict;

use Test::More tests => 4;
use Test::LongString;
use Test::Warn;

BEGIN { use_ok('Data::ICal::Entry::Todo') }

my $todo = Data::ICal::Entry::Todo->new();
isa_ok($todo, 'Data::ICal::Entry::Todo');

$todo->add_property( summary => [ 'Sum it up.', { language => 'bla"bla'} ] );

my $str;

warning_like { $str = $todo->as_string( crlf => "\n") }
    {carped => qr(Invalid parameter value)}, 
    "Got a warning for fake property set";

is_string($str, <<END_VCAL, "Got the right output");
BEGIN:VTODO
SUMMARY;LANGUAGE=blabla:Sum it up.
END:VTODO
END_VCAL