From f7716ac1a87649cad96242f2d5bf0a987d7f430c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 7 Mar 2022 15:31:00 +0100 Subject: Add new tests. --- tests/xcal.scm | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 tests/xcal.scm (limited to 'tests/xcal.scm') diff --git a/tests/xcal.scm b/tests/xcal.scm deleted file mode 100644 index 6e80405b..00000000 --- a/tests/xcal.scm +++ /dev/null @@ -1,50 +0,0 @@ -;;; Commentary: -;; Basic tests of xcal convertion. -;; Currently only checks that events survive a round trip. -;;; Code: - -(((vcomponent formats xcal parse) sxcal->vcomponent) - ((vcomponent formats xcal output) vcomponent->sxcal) - ((vcomponent formats ical parse) parse-calendar) - ((hnh util) ->) - ((vcomponent base) - parameters prop* children) - ) - -;;; Some different types, same parameters - -(define ev - (call-with-input-string "BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//calparse-test -BEGIN:VEVENT -SUMMARY:Test event -DTSTART;TZID=Europe/Stockholm:20200625T133000 -DTEND:20200625T143000Z -DTSTAMP:20200609T131418Z -UID:1 -SEQUENCE:0 -CREATED:20200609T081725Z -DESCRIPTION:Short description -LAST-MODIFIED:20200609T081725Z -STATUS;X-TEST-PARAM=10:CONFIRMED -TRANSP:OPAQUE -END:VEVENT -END:VCALENDAR" - parse-calendar)) - -(define twice-converted - (-> ev - vcomponent->sxcal - sxcal->vcomponent)) - -;;; NOTE both these tests may fail since neither properties nor parameters are ordered sorted. - -(test-equal "c->x & c->x->c->x" - (vcomponent->sxcal ev) - (vcomponent->sxcal twice-converted)) - -(test-equal "xcal parameters" - '((X-TEST-PARAM "10")) - (parameters (prop* (car (children twice-converted)) - 'STATUS))) -- cgit v1.2.3