diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-01-13 22:50:51 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-01-13 22:50:51 +0100 |
commit | 641278c624a3a0c06856656255f648f2cf4f6a92 (patch) | |
tree | 49c47c4c61dd0704e89cfd75681bc16f171e7ad5 /tests/vcomponent-datetime.scm | |
parent | Add debug buttons in popup for dumping xcal and jcal. (diff) | |
parent | Document (vcompenent control). (diff) | |
download | calp-641278c624a3a0c06856656255f648f2cf4f6a92.tar.gz calp-641278c624a3a0c06856656255f648f2cf4f6a92.tar.xz |
Merge branch 'doc' into jcal
Diffstat (limited to '')
-rw-r--r-- | tests/vcomponent-datetime.scm | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/vcomponent-datetime.scm b/tests/vcomponent-datetime.scm index f7bb00f4..0bc584f6 100644 --- a/tests/vcomponent-datetime.scm +++ b/tests/vcomponent-datetime.scm @@ -1,3 +1,8 @@ +;;; Commentary: +;; Tests that event-clamping (checking how long part of an event +;; overlaps another time span) works. +;;; Code: + (((datetime) date time datetime) @@ -13,10 +18,15 @@ DTEND:20200401T100000 END:VEVENT" parse-calendar)) +;; |-----------------| test interval +;; |----------| event interval (test-equal "Correct clamping" - (datetime time: (time hour: 7)) - (event-length/clamped #2020-03-23 #2020-03-29 ev)) + (datetime time: (time hour: 7)) ; 2020-03-29T17:00 - 2020-03-30T00:00 + (event-length/clamped + #2020-03-23 ; a time way before the start of the event + #2020-03-29 ; a time slightly after the end of the event + ev)) (define utc-ev (call-with-input-string "BEGIN:VEVENT |