From 3c078ad1368cd9674843d0d480489d5366862b2f Mon Sep 17 00:00:00 2001 From: Philipp Kewisch Date: Wed, 1 May 2024 09:12:52 +0200 Subject: [PATCH] Known failure test for #634 --- test/failure_test.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/test/failure_test.js b/test/failure_test.js index 32b84be2..b1d408f6 100644 --- a/test/failure_test.js +++ b/test/failure_test.js @@ -37,4 +37,31 @@ suite('Known failures', function() { assert.equal(subject.getParameter("cn"), "Z\\;"); assert.equal(subject.getFirstValue(), "mailto:z@example.org"); }); + + // Quoted multi-value parameters leak into the value + // Please see https://github.com/kewisch/ical.js/issues/634 + testKnownFailure('with quoted multi-value parameter', function() { + let attendee = ICAL.Property.fromString( + 'ATTENDEE;MEMBER=' + + '"mailto:mygroup@localhost",' + + '"mailto:mygroup2@localhost",' + + '"mailto:mygroup3@localhost":' + + 'mailto:user2@localhost' + ); + + let expected = [ + 'attendee', + { + member: [ + 'mailto:mygroup@localhost', + 'mailto:mygroup2@localhost', + 'mailto:mygroup3@localhost' + ] + }, + 'cal-address', + 'mailto:user2@localhost' + ]; + + assert.deepEqual(attendee.toJSON(), expected); + }); });