diff options
Diffstat (limited to 'src/test/regression.c')
-rw-r--r-- | src/test/regression.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/regression.c b/src/test/regression.c index 1e5a0acb..36a49961 100644 --- a/src/test/regression.c +++ b/src/test/regression.c @@ -4921,6 +4921,7 @@ test_icalvalue_resets_timezone_on_set(void) static void test_comma_in_xproperty(void) { + // X-property value without explicit value type icalproperty *xproperty = icalproperty_new_from_string("X-TEST-PROPERTY:test,test"); icalcomponent *c; @@ -4935,6 +4936,21 @@ static void test_comma_in_xproperty(void) str_is("icalproperty_as_ical_string()", "X-TEST-PROPERTY:test,test\r\n", icalproperty_as_ical_string(icalcomponent_get_first_property(icalcomponent_get_inner(c), ICAL_X_PROPERTY))); icalcomponent_free(c); + + // X-property value with TEXT value type + xproperty = icalproperty_new_from_string("X-TEST-PROPERTY;VALUE=TEXT:test\\,test"); + + c = icalcomponent_vanew( + ICAL_VCALENDAR_COMPONENT, + icalcomponent_vanew( + ICAL_VEVENT_COMPONENT, + xproperty, + 0), + 0); + + str_is("icalproperty_as_ical_string()", "X-TEST-PROPERTY;VALUE=TEXT:test\\,test\r\n", icalproperty_as_ical_string(icalcomponent_get_first_property(icalcomponent_get_inner(c), ICAL_X_PROPERTY))); + + icalcomponent_free(c); } static void test_remove_tzid_from_due(void) |