Skip to content

Correct tests in the Compat category

Damien Caliste requested to merge work/dcaliste/tests into master

@winterz The Compat category is reading an ICS file that was produced by another software. Then it is dumping it and compare the dump to a reference dump by KCalendarCore created a long time ago. Nowadays, many tests are failing because we're far from this old reference. I've tried in this MR to do minimal changing in the reference which we are comparing to. But some parts were surely wrong in these references. Like for instance dumping several times the same VTIMEZONE definitions. Each time I've introduced a modification in the reference, I've checked that the modification is matching the original ICS data. In the MSExchange test, we're now outputting a new VTIMEZONE definition, that is so because we try to match the definition of the input file with a IANA one. Previously, this was buggy when the local time zone was wrong, like in th "GM" case of the test. I'm pushing also a commit from a contributor in SailfishOS correcting this. The transitions were calculated by passing to the local time, which is ill-defined in the case of an illegal system time zone. The patch is using UTC instead, which is far more robust.

Here is a quick overview of changes in references:

  • Reorder incidences and ensure that QHash storing them will always use a predictable ordering in the tests.
  • Remove the spurious TZID=UTC to use the 'Z' notation instead.
  • Correct some date and time that were incorrect in the reference when compared to the original source.
  • Use the GMT time zone instead of the GM one that is not defined.

After this MR only one uniaue test is failing on Debian, but I think it's a Qt bug with the Prague time zone defintion.

Edited by Damien Caliste

Merge request reports