diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-12-01 23:13:32 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-12-01 23:15:01 +0100 |
commit | 1a18c30f06b97392414a8a69f04b52918bdfe554 (patch) | |
tree | 421fdb303abf4adb3476debaa7287484076a4a84 /module/vcomponent/formats | |
parent | Properly specify as-list and with-parameters interaction. (diff) | |
download | calp-1a18c30f06b97392414a8a69f04b52918bdfe554.tar.gz calp-1a18c30f06b97392414a8a69f04b52918bdfe554.tar.xz |
Repair format tests.
The test have been really broken for a while, since the return type of
`parameters` changed somewhere along the line.
The serializers are now updated to the new API, and the tests updated to
compare components correctly!
Diffstat (limited to '')
-rw-r--r-- | module/vcomponent/formats/ical.scm | 4 | ||||
-rw-r--r-- | module/vcomponent/formats/ical/output.scm | 5 | ||||
-rw-r--r-- | module/vcomponent/formats/xcal/output.scm | 4 |
3 files changed, 6 insertions, 7 deletions
diff --git a/module/vcomponent/formats/ical.scm b/module/vcomponent/formats/ical.scm index dddca946..6005c550 100644 --- a/module/vcomponent/formats/ical.scm +++ b/module/vcomponent/formats/ical.scm @@ -4,9 +4,7 @@ :use-module ((vcomponent formats ical parse) :select (parse-calendar)) :export (serialize - deserialize - ) - ) + deserialize)) (define (serialize component port) diff --git a/module/vcomponent/formats/ical/output.scm b/module/vcomponent/formats/ical/output.scm index 5fa004bb..9e227b56 100644 --- a/module/vcomponent/formats/ical/output.scm +++ b/module/vcomponent/formats/ical/output.scm @@ -148,16 +148,17 @@ (for-each ;; Special cases depending on key. ;; Value formatting is handled in @code{value-format}. + (match-lambda [(? (compose internal-field? car)) 'noop] - [(key vlines ...) + [(key (vlines ...)) (for vline in vlines (display (vline->string vline)) (display "\r\n"))] - [(key . vline) + [(key vline) (display (vline->string vline)) (display "\r\n")]) (properties component)) diff --git a/module/vcomponent/formats/xcal/output.scm b/module/vcomponent/formats/xcal/output.scm index 6d5e0656..a5f8a934 100644 --- a/module/vcomponent/formats/xcal/output.scm +++ b/module/vcomponent/formats/xcal/output.scm @@ -111,7 +111,7 @@ (match-lambda [(? (compose internal-field? car)) #f] - [(key vlines ...) + [(key (vlines ...)) (remove null? `(,(xml xcal (downcase-symbol key)) ,(parameters-tag (reduce assq-merge @@ -120,7 +120,7 @@ ,@(for vline in vlines (vline->value-tag vline))))] - [(key . vline) + [(key vline) (remove null? `(,(xml xcal (downcase-symbol key)) ,(parameters-tag (parameters vline)) |