aboutsummaryrefslogtreecommitdiff
path: root/tests/prop.scm
blob: a178170d7329f65787278771b170de559c732f42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
(((vcomponent base) prop attr* properties)
 ((vcomponent parse) parse-calendar)
 ((util) sort*))

(define v (call-with-input-string
              "BEGIN:DUMMY
KEY;A=1;B=2:Some text
END:DUMMY"
              parse-calendar))

(test-equal '("1") (prop (attr* v 'KEY) 'A))
(test-equal '("2") (prop (attr* v 'KEY) 'B))
(test-equal #f (prop (attr* v 'KEY) 'C))

(test-equal '(A B) (sort* (map car (properties (attr* v 'KEY)))
                          string<?
                          symbol->string))