gener-test-0
NAME
gener-test-0.1.0.raku -- Generation of test data
SYNOPSIS
raku gener-test-0.1.0.raku > /tmp/test-data
Copy-paste from /tmp/test-data to the tests scripts.
DESCRIPTION
This program uses the various Date::Calendar::xxx classes, to
generate test data for version 0.1.0 and API 1. After the test data
are generated, check them with another source (some websites, some
Android apps). Please remember that the
other sources do not care about sunset (and sunrise for the civil Maya
and Aztec calendars and for the Armenian calendar) and that you will
have to mentally shift the results before the comparison.
And after the data are checked, copy-paste the lines into the test
scripts xt/07-conv-old.rakutest and xt/08-conv-new.rakutest.
In xt/07-conv-old.rakutest, fill the @data-maya array with the
lines listing Maya and Aztec dates and fill the @data-others array
with the lines listing other dates. Then cut the lines listing 'gr'
dates and paste them into the @data-greg array and add the
Gregorian date with the 'YYYY-MM-AA' format at the end of each array
line.
Note: the 07-conv-old.rakutest data is meant to check, among
others, the Date::Calendar::Ethiopian module, version 0.0.3, in
which there was an off-by-one error on the weekday names. On the other
hand, in this program, the Ethiopian data was generated with the
Date::Calendar::Ethiopian module, version 0.1.1, with no
off-by-one error. So when copying-pasting data into
07-conv-old.rakutest, you should reintroduce the off-by-one errors
with:
s/Sanyo/Maksegno/
s/Maksanyo/Rob/
In xt/08-conv-new.rakutest, fill the @data-maya array with the
lines listing Maya and Aztec dates and fill the @data array with
the lines listing other dates. No special processing for the Gregorian
dates and the Ethiopian dates.
Remember that you need to erase the first comma in each chunk of copied-pasted code.
All computed dates are daylight dates. So it does not matter which version and API are such and such classes. Daylight dates gives exactly the same results with version 0.1.x / API 1 as with version 0.0.y / API 0.
AUTHOR
Jean Forget <J2N-FORGET at orange dot fr>
COPYRIGHT AND LICENSE
Copyright (c) 2025 Jean Forget, all rights reserved
This program is free software; you can redistribute it and/or modify it under the Artistic License 2.0.