aboutsummaryrefslogtreecommitdiff
path: root/tests/vcomponent-control.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-03-07 15:31:00 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-03-07 20:29:14 +0100
commitf7716ac1a87649cad96242f2d5bf0a987d7f430c (patch)
treeb4b84951ef468fd644c42e9e0fee535d879f0387 /tests/vcomponent-control.scm
parentCleanup in (hnh util path). (diff)
downloadcalp-f7716ac1a87649cad96242f2d5bf0a987d7f430c.tar.gz
calp-f7716ac1a87649cad96242f2d5bf0a987d7f430c.tar.xz
Add new tests.
Diffstat (limited to 'tests/vcomponent-control.scm')
-rw-r--r--tests/vcomponent-control.scm29
1 files changed, 0 insertions, 29 deletions
diff --git a/tests/vcomponent-control.scm b/tests/vcomponent-control.scm
deleted file mode 100644
index 1f4d6801..00000000
--- a/tests/vcomponent-control.scm
+++ /dev/null
@@ -1,29 +0,0 @@
-;;; Commentary:
-;; Tests that with-replaced-properties work.
-;;; Code:
-
-(((vcomponent util control) with-replaced-properties)
- ((vcomponent formats ical parse) parse-calendar)
- ((vcomponent base) prop))
-
-
-
-(define ev (call-with-input-string
- "BEGIN:DUMMY
-X-KEY:value
-END:DUMMY"
- parse-calendar))
-
-;; Test that temoraries are set and restored
-(test-equal "value" (prop ev 'X-KEY))
-(with-replaced-properties (ev (X-KEY "other"))
- (test-equal "other" (prop ev 'X-KEY)))
-(test-equal "value" (prop ev 'X-KEY))
-
-;; Test that they are restored on non-local exit
-(catch #t
- (lambda ()
- (with-replaced-properties (ev (X-KEY "other"))
- (throw 'any)))
- (lambda _
- (test-equal "value" (prop ev 'X-KEY))))