Commit graph

6 commits

Author SHA1 Message Date
Juerd Waalboer
b5efbcdff9 More tests
- calc.t: more tests for invalid syntax
- fileio.t was generated a while ago
2023-12-25 05:02:02 +01:00
Juerd Waalboer
3dab71fdbf support simple arithmetic (only + and -) for monetary amounts 2023-12-25 00:33:46 +01:00
Juerd Waalboer
3470ebeb1c Explicitly use Perl 5.32
Was already implicitly required (since 59387ddb) because RevBank::Amount
uses the "isa" feature, which was introduced in Perl 5.32 (but no longer
experimental since 5.36, not 5.32 as the old comment said).

Perl 5.32 was released in June 2020, and ships with Debian bullseye
("oldstable") which was released in August 2021.
2023-12-12 00:28:17 +01:00
Juerd Waalboer
2015e6362d Some more tests by ChatGPT
This is hilarious.
2023-03-16 00:30:48 +01:00
Juerd Waalboer
b052292a22 ChatGPT wrote some unit tests and found a small bug.
When asked to fix the bug, it came up with a different regex, which
would completely change what's valid and what's not, so that's totally
wrong:

    /^\s*(-)?([0-9]+)(?:[,.]([0-9]{1,2}))?\s*$/

When asked to fix it in another way, without changing the regex, it
suggested stripping the sign completely, which is even more wrong.

So I fixed it myself :)
2023-03-16 00:00:26 +01:00
Juerd Waalboer
38a0229899 Ditch floating point numbers, use cents instead; bump version to 3.2 2021-12-02 22:18:06 +01:00