Skip to content

Commit 7bd8708

Browse files
committed
test: Add test for escaped semicolons in RRULEs
1 parent 647cf9e commit 7bd8708

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

calendar_test.go

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,31 @@ ATTENDEE;CN=Test\;User:mailto:user@example.com
341341
CLASS:PUBLIC
342342
END:VEVENT
343343
END:VCALENDAR
344+
`,
345+
},
346+
{
347+
name: "test RRULE escaping",
348+
input: `BEGIN:VCALENDAR
349+
VERSION:2.0
350+
X-CUSTOM-FIELD:test
351+
PRODID:-//arran4//Golang ICS Library
352+
DESCRIPTION:test
353+
BEGIN:VEVENT
354+
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=SU
355+
CLASS:PUBLIC
356+
END:VEVENT
357+
END:VCALENDAR
358+
`,
359+
output: `BEGIN:VCALENDAR
360+
VERSION:2.0
361+
X-CUSTOM-FIELD:test
362+
PRODID:-//arran4//Golang ICS Library
363+
DESCRIPTION:test
364+
BEGIN:VEVENT
365+
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=SU
366+
CLASS:PUBLIC
367+
END:VEVENT
368+
END:VCALENDAR
344369
`,
345370
},
346371
}

0 commit comments

Comments
 (0)