File: 06-month-wrap.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 (27 lines) | stat: -rw-r--r-- 654 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
24
25
26
27
# -*-cperl -*-
# vim: ft=perl
# $Id$
use Test::More tests => 1;
use iCal::Parser;

# Regression test:
# day() returns the day of month not the day in the calendar, therefore using
# int comparison will yield funny results when day-of-month of event end is
# before day-of-month of event start. This VCALENDAR, for instance, would have
# no event:

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

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

ok(keys %{$c->{events}}, 'events are parsed despite day-of-month wrap');