aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/vcomponent/vcomponent.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-10-16 15:31:53 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-10-16 15:31:53 +0200
commitde57e38c099df532cf2e63e2a4e95b94c255abb6 (patch)
treee3fcca1fe6c325fc7d768134a733485408cfb1c1 /tests/unit/vcomponent/vcomponent.scm
parentChange printer for vcomponent. (diff)
downloadcalp-de57e38c099df532cf2e63e2a4e95b94c255abb6.tar.gz
calp-de57e38c099df532cf2e63e2a4e95b94c255abb6.tar.xz
Update number of tests.
Diffstat (limited to 'tests/unit/vcomponent/vcomponent.scm')
-rw-r--r--tests/unit/vcomponent/vcomponent.scm30
1 files changed, 29 insertions, 1 deletions
diff --git a/tests/unit/vcomponent/vcomponent.scm b/tests/unit/vcomponent/vcomponent.scm
index ebd0b1ff..523cce54 100644
--- a/tests/unit/vcomponent/vcomponent.scm
+++ b/tests/unit/vcomponent/vcomponent.scm
@@ -8,7 +8,8 @@
:use-module (srfi srfi-88)
:use-module (hnh util table)
:use-module (datetime)
- :use-module (vcomponent base))
+ :use-module (vcomponent base)
+ :use-module ((vcomponent create) :select (vevent vcalendar with-parameters)))
@@ -87,6 +88,33 @@
`((K1 . "V1")
(K2 . "V2"))))))
+(test-equal "VLine string representation"
+ "#<<vline> key: KEY value: \"Value\" parameters: #f>"
+ (with-output-to-string
+ (lambda ()
+ (write (vline key: 'KEY vline-value: "Value") ))))
+
+;; (test-equal "VLine with parameters representation"
+;; "#<<vline> key: KEY value: \"Value\" parameters: #f>"
+;; (with-output-to-string
+;; (lambda ()
+;; (write (vline key: 'KEY vline-value: "Value") ))))
+
+(test-equal "VComponent string representation"
+ "(vcomponent (quote VCALENDAR) (list (vcomponent (quote VEVENT) #:dtstart #<<vline> key: DTSTART value: #2023-03-01T10:00:00 parameters: #f> #:uid #<<vline> key: UID value: \"049d9004-cb1e-4c8d-bb54-042689d9808b\" parameters: #f>)))"
+
+ (with-output-to-string
+ (lambda ()
+ (write (vcalendar
+ ;; name: "Hello"
+ (list (vevent
+ uid: "049d9004-cb1e-4c8d-bb54-042689d9808b"
+ dtstart:
+ (with-parameters
+ tzid: "Europe/Stockholm"
+ (datetime year: 2023 month: mars day: 1
+ hour: 10)))))))))
+
;; remove-property
;; extract extract*