Fix timezone test
ClosedPublic

Authored by vkrause on Sep 19 2019, 4:09 PM.

Details

Summary

There are two things impacting this:

  • this used the current time (fixed)
  • this depends on the system timezone database (reference data adapted to latest version of the timezone package)

Diff Detail

Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 16837
Build 16855: arc lint + arc unit
vkrause requested review of this revision.Sep 19 2019, 4:09 PM
vkrause created this revision.
dfaure requested changes to this revision.Sep 20 2019, 12:12 PM

It still fails for me.

FAIL!  : ICalTimeZonesTest::write() Compared values are not the same
   Actual   (vtimezone)             : "BEGIN:VTIMEZONE\r\nTZID:Europe/Prague\r\nBEGIN:DAYLIGHT\r\nTZNAME:CEST\r\nTZOFFSETFROM:+0000\r\nTZOFFSETTO:+0200\r\nDTSTART:19790401T010000\r\nRDATE;VALUE=DATE-TIME:19790401T010000\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZNAME:CET\r\nTZOFFSETFROM:+"...
   Expected (QByteArray(VTZ_Prague)): "BEGIN:VTIMEZONE\r\nTZID:Europe/Prague\r\nBEGIN:DAYLIGHT\r\nTZNAME:CEST\r\nTZOFFSETFROM:+0000\r\nTZOFFSETTO:+0200\r\nDTSTART:19790401T010000\r\nRDATE:19790401T010000\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZNAME:CET\r\nTZOFFSETFROM:+0200\r\nTZOFFSET"...
   Loc: [/d/kde/src/5/frameworks/kcalendarcore/autotests/testicaltimezones.cpp(218)]

RDATE has a different format...

This revision now requires changes to proceed.Sep 20 2019, 12:12 PM
vkrause updated this revision to Diff 66545.Sep 20 2019, 3:26 PM

Attempt to support older libical versions too.

It still fails for me.

FAIL!  : ICalTimeZonesTest::write() Compared values are not the same
   Actual   (vtimezone)             : "BEGIN:VTIMEZONE\r\nTZID:Europe/Prague\r\nBEGIN:DAYLIGHT\r\nTZNAME:CEST\r\nTZOFFSETFROM:+0000\r\nTZOFFSETTO:+0200\r\nDTSTART:19790401T010000\r\nRDATE;VALUE=DATE-TIME:19790401T010000\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZNAME:CET\r\nTZOFFSETFROM:+"...
   Expected (QByteArray(VTZ_Prague)): "BEGIN:VTIMEZONE\r\nTZID:Europe/Prague\r\nBEGIN:DAYLIGHT\r\nTZNAME:CEST\r\nTZOFFSETFROM:+0000\r\nTZOFFSETTO:+0200\r\nDTSTART:19790401T010000\r\nRDATE:19790401T010000\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZNAME:CET\r\nTZOFFSETFROM:+0200\r\nTZOFFSET"...
   Loc: [/d/kde/src/5/frameworks/kcalendarcore/autotests/testicaltimezones.cpp(218)]

RDATE has a different format...

There's indeed an #ifdef on the libical version stripping out the ;VALUE=DATE-TIME.

dfaure accepted this revision.Sep 21 2019, 1:22 PM

Works, thanks.

This revision is now accepted and ready to land.Sep 21 2019, 1:22 PM
vkrause closed this revision.Sep 21 2019, 1:24 PM