diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-02-13 22:11:22 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-02-13 22:11:22 +0100 |
commit | ce14c424ee1d8340d949628b5eca6bdf808daab5 (patch) | |
tree | 3d2a836e4778271fc098a16180e0bdbc67727ffb | |
parent | Begin1 handle multiple values. (diff) | |
download | calp-ce14c424ee1d8340d949628b5eca6bdf808daab5.tar.gz calp-ce14c424ee1d8340d949628b5eca6bdf808daab5.tar.xz |
Datetime test parse-month.
-rw-r--r-- | tests/datetime.scm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/datetime.scm b/tests/datetime.scm index d1ebd238..eb9c02b6 100644 --- a/tests/datetime.scm +++ b/tests/datetime.scm @@ -14,6 +14,7 @@ datetime- leap-year? string->date string->time string->datetime + parse-month ) ((ice-9 format) format) ((hnh util) let*) @@ -226,3 +227,15 @@ (test-equal "Parse date single digit day, trailing comma + space" (date day: 6) (string->date "6, " "~d, ")) + + +(define en_US (make-locale LC_TIME "en_US.UTF-8")) +(define sv_SE (make-locale LC_TIME "sv_SE.UTF-8")) + +(test-equal 1 (parse-month "jan" en_US)) +(test-equal 1 (parse-month "jan" sv_SE)) + +(test-equal 12 (parse-month "dec" en_US)) +(test-equal -1 (parse-month "inv" en_US)) + +(test-equal 5 (parse-month "mAJ" sv_SE)) |