diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-02-23 03:00:20 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-02-23 04:04:04 +0100 |
commit | 2de493b798997027758fb3540c796a3f06f9ade1 (patch) | |
tree | 98a2fe150732a34554454c0cf873ece1481f0abb /tests/test/annoying-events.scm | |
parent | Change group-by to return direct pairs. (diff) | |
download | calp-2de493b798997027758fb3540c796a3f06f9ade1.tar.gz calp-2de493b798997027758fb3540c796a3f06f9ade1.tar.xz |
Start using (vcomponent create) in tests.
This allows us to focus on what we are testing, instead of on the parser
in question. It also makes the code parser-agnostic.
Diffstat (limited to 'tests/test/annoying-events.scm')
-rw-r--r-- | tests/test/annoying-events.scm | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/tests/test/annoying-events.scm b/tests/test/annoying-events.scm index 4e5aa07d..d41ee450 100644 --- a/tests/test/annoying-events.scm +++ b/tests/test/annoying-events.scm @@ -12,32 +12,26 @@ :select (extract prop make-vcomponent)) :use-module ((vcomponent datetime) :select (event-overlaps?)) :use-module ((datetime) :select (date date+ date<)) - :use-module ((hnh util) :select (set!))) + :use-module ((hnh util) :select (set!)) + :use-module (vcomponent create) + :use-module (vcomponent base)) -;; TODO remove this -(define* (event key: summary dtstart dtend) - (define ev (make-vcomponent 'VEVENT)) - (set! (prop ev 'SUMMARY) summary - (prop ev 'DTSTART) dtstart - (prop ev 'DTEND) dtend) - ev) -(define start - #2021-11-01) +(define start #2021-11-01) (define end (date+ start (date day: 8))) (define ev-set (stream - (event ; should be part of the result + (vevent ; should be part of the result summary: "A" dtstart: #2021-10-01 dtend: #2021-12-01) - (event ; should NOT be part of the result + (vevent ; should NOT be part of the result summary: "B" dtstart: #2021-10-10 dtend: #2021-10-11) - (event ; should also be part of the result + (vevent ; should also be part of the result summary: "C" dtstart: #2021-11-02 dtend: #2021-11-03))) |