aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-09-13 01:34:44 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-09-13 01:34:44 +0200
commitb9695ad23caa3e404d140eaa117abcd17a40b079 (patch)
tree0857e4a3d403fc7a123d5350bf73fd7249802318
parentRewrote `with-replaced-properties`. (diff)
downloadcalp-b9695ad23caa3e404d140eaa117abcd17a40b079.tar.gz
calp-b9695ad23caa3e404d140eaa117abcd17a40b079.tar.xz
test fixes.
-rwxr-xr-xtests/run-tests.scm2
-rw-r--r--tests/test/recurrence-simple.scm70
-rw-r--r--tests/test/vcomponent-control.scm2
3 files changed, 42 insertions, 32 deletions
diff --git a/tests/run-tests.scm b/tests/run-tests.scm
index 4b6d2773..83006035 100755
--- a/tests/run-tests.scm
+++ b/tests/run-tests.scm
@@ -127,7 +127,7 @@ fi
(test-assert (format #f "~a in ~a: ~?" err from msg args)
#f))
(args
- (test-assert (format #f "~a (~s)" f args)
+ (test-assert (format #f "~s" args)
#f)))))
(lambda (proc) (proc))))
diff --git a/tests/test/recurrence-simple.scm b/tests/test/recurrence-simple.scm
index 33900ceb..b0c3bdea 100644
--- a/tests/test/recurrence-simple.scm
+++ b/tests/test/recurrence-simple.scm
@@ -54,12 +54,13 @@
;;; also see the neighbour test file recurrence.scm for more tests.
(define ev
- (call-with-input-string
- "BEGIN:VEVENT
+ (car
+ (call-with-input-string
+ "BEGIN:VEVENT
DTSTART;VALUE=DATE:20190302
RRULE:FREQ=DAILY
END:VEVENT"
- parse-calendar))
+ parse-calendar)))
(test-assert "Generate at all"
(stream-car (generate-recurrence-set ev)))
@@ -90,113 +91,122 @@ END:VEVENT"
(stream-take 5 (day-stream (prop ev 'DTSTART)))))
(define ev
- (call-with-input-string
- "BEGIN:VEVENT
+ (car
+ (call-with-input-string
+ "BEGIN:VEVENT
DTSTART:20190302T100000
RRULE:FREQ=DAILY
END:VEVENT"
- parse-calendar))
+ parse-calendar)))
(test-assert "daily 10:00"
(stream-car (generate-recurrence-set ev)))
(define ev
- (call-with-input-string
- "BEGIN:VEVENT
+ (car
+ (call-with-input-string
+ "BEGIN:VEVENT
DTSTART:20190302T100000
DTEND:20190302T120000
RRULE:FREQ=DAILY
END:VEVENT"
- parse-calendar))
+ parse-calendar)))
(test-assert "daily 10-12"
(stream-car (generate-recurrence-set ev)))
(define ev
- (call-with-input-string
- "BEGIN:VEVENT
+ (car
+ (call-with-input-string
+ "BEGIN:VEVENT
DTSTART:20190302T100000
DTEND:20190302T120000
RRULE:FREQ=WEEKLY
END:VEVENT"
- parse-calendar))
+ parse-calendar)))
(test-assert "weekly 10-12"
(stream-car (generate-recurrence-set ev)))
(define ev
- (call-with-input-string
- "BEGIN:VEVENT
+ (car
+ (call-with-input-string
+ "BEGIN:VEVENT
DTSTART;TZID=Europe/Stockholm:20190302T100000
DTEND;TZID=Europe/Stockholm:20190302T120000
RRULE:FREQ=WEEKLY
END:VEVENT"
- parse-calendar))
+ parse-calendar)))
(test-assert "weekly TZ 10-12"
(stream-car (generate-recurrence-set ev)))
(define ev
- (call-with-input-string
- "BEGIN:VEVENT
+ (car
+ (call-with-input-string
+ "BEGIN:VEVENT
DTSTART;TZID=Europe/Stockholm:20190302T100000
DTEND;TZID=Europe/Stockholm:20190302T120000
RRULE:FREQ=WEEKLY
SEQUENCE:1
END:VEVENT"
- parse-calendar))
+ parse-calendar)))
(test-assert "weekly TZ SEQUENCE 10-12"
(stream-car (generate-recurrence-set ev)))
(define ev
- (call-with-input-string
- "BEGIN:VEVENT
+ (car
+ (call-with-input-string
+ "BEGIN:VEVENT
DTSTART;TZID=Europe/Stockholm:20190302T100000
RRULE:FREQ=WEEKLY
DTEND;TZID=Europe/Stockholm:20190302T120000
SEQUENCE:1
LOCATION:Here
END:VEVENT"
- parse-calendar))
+ parse-calendar)))
(test-assert "weekly TZ SEQUENCE LOCATION 10-12"
(stream-car (generate-recurrence-set ev)))
(define ev
- (call-with-input-string
- "BEGIN:VEVENT
+ (car
+ (call-with-input-string
+ "BEGIN:VEVENT
DTSTART:20180117T170000
RRULE:FREQ=WEEKLY
LOCATION:~
END:VEVENT"
- parse-calendar))
+ parse-calendar)))
(test-assert "Just location"
(stream-car (generate-recurrence-set ev)))
(define ev
- (call-with-input-string
- "BEGIN:VEVENT
+ (car
+ (call-with-input-string
+ "BEGIN:VEVENT
DTSTART;TZID=Europe/Stockholm:20180117T170000
DTEND;TZID=Europe/Stockholm:20180117T200000
RRULE:FREQ=WEEKLY
END:VEVENT"
- parse-calendar))
+ parse-calendar)))
(test-assert "Same times"
(stream-car (generate-recurrence-set ev)))
(define ev
- (call-with-input-string
- "BEGIN:VEVENT
+ (car
+ (call-with-input-string
+ "BEGIN:VEVENT
DTSTART;TZID=Europe/Stockholm:20180117T170000
RRULE:FREQ=WEEKLY
DTEND;TZID=Europe/Stockholm:20180117T200000
SEQUENCE:1
LOCATION:~
END:VEVENT"
- parse-calendar))
+ parse-calendar)))
;; errer in dtend ?
diff --git a/tests/test/vcomponent-control.scm b/tests/test/vcomponent-control.scm
index 6ab38996..cf6995bf 100644
--- a/tests/test/vcomponent-control.scm
+++ b/tests/test/vcomponent-control.scm
@@ -5,7 +5,7 @@
(define-module (test vcomponent-control)
:use-module (srfi srfi-64)
:use-module (srfi srfi-88)
- :use-module ((vcomponent create))
+ :use-module (vcomponent create)
:use-module ((vcomponent util control)
:select (with-replaced-properties))
:use-module ((vcomponent formats ical parse)