aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2020-02-14 00:21:12 +0100
committerHugo Hörnquist <hugo@hornquist.se>2020-02-14 00:21:12 +0100
commit55afaaacae1fcc5d3c09bbc52ed7c9b33743d473 (patch)
treeaab4aa6fed371b0c026d328c9b4bc69fbc0e2ca1 /tests
parentMonths once again start on the first. (diff)
downloadcalp-55afaaacae1fcc5d3c09bbc52ed7c9b33743d473.tar.gz
calp-55afaaacae1fcc5d3c09bbc52ed7c9b33743d473.tar.xz
Cleanup and tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/srfi-srfi-19-alt-util.scm11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/srfi-srfi-19-alt-util.scm b/tests/srfi-srfi-19-alt-util.scm
index 498862ea..7343bfa3 100644
--- a/tests/srfi-srfi-19-alt-util.scm
+++ b/tests/srfi-srfi-19-alt-util.scm
@@ -1,5 +1,5 @@
(((srfi srfi-19 alt) date time)
- ((srfi srfi-19 alt util) month-stream)
+ ((srfi srfi-19 alt util) month-stream in-date-range?)
((srfi srfi-41) stream->list stream-take
))
@@ -14,3 +14,12 @@
(test-assert "20 months"
(stream->list (stream-take 20 (month-stream #2020-01-01))))
+
+(test-equal "Correct months"
+ (list #2020-02-01 #2020-03-01 #2020-04-01 #2020-05-01 #2020-06-01 #2020-07-01 #2020-08-01 #2020-09-01 #2020-10-01 #2020-11-01 #2020-12-01 #2021-01-01)
+
+ (stream->list (stream-take 12 (month-stream #2020-02-01))))
+
+(test-assert "in-date-range?"
+ (not ((in-date-range? #2020-01-01 #2020-02-29)
+ #2018-02-02)))