aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/vcomponent/recurrence-simple.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-10-16 19:39:12 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-10-16 19:40:24 +0200
commit22f28015981295660ff98b43789f8c4c99134f36 (patch)
treee6d43c74a23843212e0fc183a1e09ca2b5d2fa17 /tests/unit/vcomponent/recurrence-simple.scm
parentAdd `not` case to type validators. (diff)
downloadcalp-22f28015981295660ff98b43789f8c4c99134f36.tar.gz
calp-22f28015981295660ff98b43789f8c4c99134f36.tar.xz
Move timespec and recur-rule to new object system.
Diffstat (limited to '')
-rw-r--r--tests/unit/vcomponent/recurrence-simple.scm23
1 files changed, 11 insertions, 12 deletions
diff --git a/tests/unit/vcomponent/recurrence-simple.scm b/tests/unit/vcomponent/recurrence-simple.scm
index dff57346..1c778223 100644
--- a/tests/unit/vcomponent/recurrence-simple.scm
+++ b/tests/unit/vcomponent/recurrence-simple.scm
@@ -21,17 +21,15 @@
:select (warnings-are-errors warning-handler))
:use-module ((vcomponent recurrence)
:select (parse-recurrence-rule
- make-recur-rule
+ recur-rule
generate-recurrence-set)))
-(define recur-rule make-recur-rule)
-
;;; Test that basic parsing or recurrence rules work.
-(test-equal (make-recur-rule freq: 'HOURLY wkst: mon interval: 1)
+(test-equal (recur-rule freq: 'HOURLY wkst: mon interval: 1)
(parse-recurrence-rule "FREQ=HOURLY"))
-(test-equal (make-recur-rule freq: 'HOURLY count: 3 interval: 1 wkst: mon)
+(test-equal (recur-rule freq: 'HOURLY count: 3 interval: 1 wkst: mon)
(parse-recurrence-rule "FREQ=HOURLY;COUNT=3"))
;;; Test that recurrence rule parsing fails where appropriate
@@ -39,10 +37,10 @@
(parameterize ((warnings-are-errors #t)
(warning-handler (lambda _ "")))
(test-error "Invalid FREQ"
- 'warning
+ 'wrong-type-arg
(parse-recurrence-rule "FREQ=ERR;COUNT=3"))
(test-error "Negative COUNT"
- 'warning
+ 'wrong-type-arg
(parse-recurrence-rule "FREQ=HOURLY;COUNT=-1"))
(test-error "Invalid COUNT"
'wrong-type-arg
@@ -228,11 +226,12 @@
;;; Earlier I failed to actually parse the recurrence parts, in short, 1 ≠ "1".
-(test-assert "Test that xcal recur rules are parseable"
- ((@@ (vcomponent formats xcal parse) handle-value)
- 'recur
- 'props-are-unused-for-recur
- '((freq "WEEKLY") (interval "1") (wkst "MO"))))
+;;; TODO this should be part of the xCal tests
+;; (test-assert "Test that xcal recur rules are parseable"
+;; ((@@ (vcomponent formats xcal parse) handle-value)
+;; 'recur
+;; 'props-are-unused-for-recur
+;; '((freq "WEEKLY") (interval "1") (wkst "MO"))))
(define ev
(vevent