Wordclock/unit
2016-05-15 16:06:09 +02:00
..
example.lua Minute 1 to 4 are also correctly set, next to the displayed logic 2016-04-20 17:51:28 +02:00
generateTimes.sh Added some documentation for this folder; Updated the tests up to 2020 (testTimes.lua) to the new interface for summer and winter time calculation 2016-05-15 16:05:43 +02:00
generateTimesMarchOctober.sh Tweaked some user output 2016-05-15 16:06:09 +02:00
generateUnixtimes.sh Fixed leap time calculation; tested unixtimestamp convertion for the years 2016 to 2020 2016-05-14 23:28:20 +02:00
ReadMe.md Added some documentation for this folder; Updated the tests up to 2020 (testTimes.lua) to the new interface for summer and winter time calculation 2016-05-15 16:05:43 +02:00
testTimes.lua Added some documentation for this folder; Updated the tests up to 2020 (testTimes.lua) to the new interface for summer and winter time calculation 2016-05-15 16:05:43 +02:00
testTimesMarchOctober.lua Refactored summer-time calcuating function. Now, only the state summertime or wintertime is returned 2016-05-15 15:44:19 +02:00
testUnixtimes.lua Fixed leap time calculation; tested unixtimestamp convertion for the years 2016 to 2020 2016-05-14 23:28:20 +02:00
timetest_head.template Refactored summer-time calcuating function. Now, only the state summertime or wintertime is returned 2016-05-15 15:44:19 +02:00
timetest_tail.template Script generates LUA file that can be executed 2016-04-17 15:37:25 +02:00

Unit tests for the timecore module in the parent folder

Test generation

The tests were generated using the date command provided with linux.

Summer- Winter- Time calculation

The file testTimesMarchOctober.lua tests all days in March and October until the year 2100. It was generated with generateTimesMarchOctober.sh. As the minutes and seconds are generated randomly a new testscript can show new erros.

The file testTimes.lua tests all days from this year up to the year 2020. It was generated with testTimes.lua.

UnixTimestamp to UTC convertion

UnixTimestamp to local time convertion

These tests combins both chaptes above.

Test execution

All tests were executed on Linux with LUA version 5.1.5

The tests can be reproduced with the following commands:

$ lua testTimesMarchOctober.lua
$ lua testTimes.lua