File: 05-strip-some-ws.t

package info (click to toggle)
libical-parser-perl 1.21-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 620 kB
  • sloc: perl: 299; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 470 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# -*-cperl -*-
# vim: ft=perl
# $Id$
use Test::More tests => 1;
use iCal::Parser;

# Some iCal exporter add some whitespaces before the newline:

my $cal = <<EOC;
BEGIN:VCALENDAR
BEGIN:VEVENT
UID:test1
DTSTART:20221201T130000Z 
DTEND:20221201T150000Z
END:VEVENT
END:VCALENDAR
EOC

my $p = iCal::Parser->new(start=>'20221201', end=>'20221202');
my $c = $p->parse_strings($cal);

ok($c->{events}{2022}{12}{1}{test1}{DTSTART},
   'must parse despite trailing whitespace');