diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-12-13 11:06:57 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-12-13 11:17:34 +0100 |
commit | 00a66eca0f32fcf585d2c21375641020e877e3ea (patch) | |
tree | c2aceeb5047bf46e03726e1c5e8378cf86a4df63 /tests/unit/webdav/webdav-property.scm | |
parent | Fix sxml namespaced util. (diff) | |
download | calp-00a66eca0f32fcf585d2c21375641020e877e3ea.tar.gz calp-00a66eca0f32fcf585d2c21375641020e877e3ea.tar.xz |
Update things depending on namespaced sxml.sxml-work
Update all code to emit correctly formed namespaced sxml objects,
instead of the old list based approach.
Also introduces a number of typechecks which in semi-related parts of
the code.
Note that the webdav-server test is currently broken.
Diffstat (limited to 'tests/unit/webdav/webdav-property.scm')
-rw-r--r-- | tests/unit/webdav/webdav-property.scm | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/unit/webdav/webdav-property.scm b/tests/unit/webdav/webdav-property.scm index 0b465e82..b3edf7ac 100644 --- a/tests/unit/webdav/webdav-property.scm +++ b/tests/unit/webdav/webdav-property.scm @@ -25,34 +25,34 @@ ;; (test-equal "/" (href->string (href resource))) (test-equal "Basic propstat" - (propstat 200 (list (list (xml webdav 'getcontentlength) 4))) + (propstat 200 (list ((xml webdav 'getcontentlength) "4"))) (getcontentlength resource)) ;;; NOTE propstat's return order isn't stable, making this test possibly fail -(let ((ps (list (propstat 200 (list `(,(xml webdav 'displayname) "Displayname"))) - (propstat 200 (list `(,(xml webdav 'getcontenttype) "text/plain")))))) +(let ((ps (list (propstat 200 (list ((xml webdav 'displayname) "Displayname"))) + (propstat 200 (list ((xml webdav 'getcontenttype) "text/plain")))))) (test-equal "Propstat merger" (list (propstat 200 - (list (list (xml webdav 'getcontenttype) "text/plain") - (list (xml webdav 'displayname) "Displayname")))) + (list ((xml webdav 'getcontenttype) "text/plain") + ((xml webdav 'displayname) "Displayname")))) (merge-propstats ps))) (test-group "Propstat -> namespaced sxml" (test-equal "Simple" - `(,(xml webdav 'propstat) - (,(xml webdav 'prop) (,(xml webdav 'displayname) "test")) - (,(xml webdav 'status) "HTTP/1.1 200 OK")) - (propstat->namespaced-sxml (propstat 200 `((,(xml webdav 'displayname) "test")) ))) + ((xml webdav 'propstat) + ((xml webdav 'prop) ((xml webdav 'displayname) "test")) + ((xml webdav 'status) "HTTP/1.1 200 OK")) + (propstat->namespaced-sxml (propstat 200 (list ((xml webdav 'displayname) "test"))))) ;; TODO populated error field (test-equal "With response description" - `(,(xml webdav 'propstat) - (,(xml webdav 'prop) (,(xml webdav 'displayname) "test")) - (,(xml webdav 'status) "HTTP/1.1 403 Forbidden") - (,(xml webdav 'responsedescription) "Try logging in")) - (propstat->namespaced-sxml (propstat 403 `((,(xml webdav 'displayname) "test")) + ((xml webdav 'propstat) + ((xml webdav 'prop) ((xml webdav 'displayname) "test")) + ((xml webdav 'status) "HTTP/1.1 403 Forbidden") + ((xml webdav 'responsedescription) "Try logging in")) + (propstat->namespaced-sxml (propstat 403 (list ((xml webdav 'displayname) "test")) responsedescription: "Try logging in")))) '((calp webdav property)) |