From 00a66eca0f32fcf585d2c21375641020e877e3ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 13 Dec 2023 11:06:57 +0100 Subject: Update things depending on namespaced sxml. 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. --- tests/unit/webdav/webdav-resource.scm | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'tests/unit/webdav/webdav-resource.scm') diff --git a/tests/unit/webdav/webdav-resource.scm b/tests/unit/webdav/webdav-resource.scm index f6ebf3bb..f81487ed 100644 --- a/tests/unit/webdav/webdav-resource.scm +++ b/tests/unit/webdav/webdav-resource.scm @@ -52,7 +52,7 @@ (let ((props (live-properties resource))) (test-assert (list? props)) (for-each (lambda (pair) - ;; (test-assert (xml-element? (car pair))) + (test-assert (xml-element? (car pair))) (test-assert (live-property? (cdr pair))) (test-assert (procedure? (property-getter (cdr pair)))) (test-assert (procedure? (property-setter-generator (cdr pair))))) @@ -61,36 +61,36 @@ (define ns1 (string->symbol "http://example.com/namespace")) -(set-dead-property! resource `(,(xml ns1 'test) "Content")) +(set-dead-property! resource ((xml ns1 'test) "Content")) (test-equal "Get dead property" - (propstat 200 (list (list (xml ns1 'test) "Content"))) - (get-dead-property resource (xml ns1 'test))) + (propstat 200 (list ((xml ns1 'test) "Content"))) + (get-dead-property resource ((xml ns1 'test)))) (test-equal "Get live property" - (propstat 404 (list (list (xml ns1 'test)))) - (get-live-property resource (xml ns1 'test))) + (propstat 404 (list ((xml ns1 'test)))) + (get-live-property resource ((xml ns1 'test)))) (test-group "Dead properties" (test-equal "Existing property" - (propstat 200 (list (list (xml ns1 'test) "Content"))) - (get-property resource (xml ns1 'test))) + (propstat 200 (list ((xml ns1 'test) "Content"))) + (get-property resource ((xml ns1 'test)))) (test-equal "Missing property" - (propstat 404 (list (list (xml ns1 'test2)))) - (get-property resource (xml ns1 'test2)))) + (propstat 404 (list ((xml ns1 'test2)))) + (get-property resource ((xml ns1 'test2))))) (test-group "Live Properties" ;; TODO these tests were written when displayname always returned 200, but have since changed to test for 404. ;; Change to another property which return 200 (test-equal "Existing live property (through get-live-property)" - (propstat 404 `((,(xml webdav 'displayname)))) - (get-live-property resource (xml webdav 'displayname))) + (propstat 404 (list ((xml webdav 'displayname)))) + (get-live-property resource ((xml webdav 'displayname)))) (test-equal "Existing live property (thrtough get-property)" - (propstat 404 `((,(xml webdav 'displayname)))) - (get-property resource (xml webdav 'displayname)))) + (propstat 404 (list ((xml webdav 'displayname)))) + (get-property resource ((xml webdav 'displayname))))) (test-group "lookup-resource" (let* ((root (make name: "*root*")) -- cgit v1.2.3