>From c8e31f486ca04be79953d92ad87cf69174d96556 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Tue, 16 Aug 2011 10:59:30 +0000 Subject: [PATCH 2/2] regression: fixed test_convenience The test failed for two reasons: - The prefix chosen by the test had one slash too many, causing icaltimezone_get_builtin_timezone_from_tzid() to fail because it expects internal TZIDs to have three slashes before the location part. - ictt_as_string() inserts the full TZID in the resulting string, not just the location. --- libical/src/test/regression.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libical/src/test/regression.c b/libical/src/test/regression.c index 1c7759a..d6abafd 100644 --- a/libical/src/test/regression.c +++ b/libical/src/test/regression.c @@ -2280,9 +2280,9 @@ void test_convenience(){ duration = icaldurationtype_as_int(icalcomponent_get_duration(c))/60; ok("Start is 1997-08-01 12:00:00 Europe/Rome", - (0 == strcmp("1997-08-01 12:00:00 Europe/Rome", ictt_as_string(icalcomponent_get_dtstart(c))))); + (0 == strcmp("1997-08-01 12:00:00 /softwarestudio.org/Tzfile/Europe/Rome", ictt_as_string(icalcomponent_get_dtstart(c))))); ok("End is 1997-08-01 13:30:00 Europe/Rome", - (0 == strcmp("1997-08-01 13:30:00 Europe/Rome", ictt_as_string(icalcomponent_get_dtend(c))))); + (0 == strcmp("1997-08-01 13:30:00 /softwarestudio.org/Tzfile/Europe/Rome", ictt_as_string(icalcomponent_get_dtend(c))))); ok("Duration is 90 m", (duration == 90)); icalcomponent_free(c); @@ -3733,7 +3733,7 @@ int main(int argc, char *argv[]) int do_header = 0; set_zone_directory("../../zoneinfo"); - icaltimezone_set_tzid_prefix("/softwarestudio.org/Olson_20010626_2/"); + icaltimezone_set_tzid_prefix("/softwarestudio.org/"); putenv("TZ="); test_start(0); -- 1.7.2.5