src/server/test/webdav.c

branch
webdav
changeset 212
d7e7ea9c6bc6
parent 211
2160585200ac
child 214
4d7ac67a1c14
--- a/src/server/test/webdav.c	Thu Oct 31 10:26:35 2019 +0100
+++ b/src/server/test/webdav.c	Sun Dec 29 15:09:58 2019 +0100
@@ -262,7 +262,7 @@
     UCX_TEST_ASSERT(
             !strcmp(p2->set->property->name, "a"),
             "p2: set property 1: wrong name");
-    WSXmlNode *p2set1 = p2->set->property->value;
+    WSXmlNode *p2set1 = p2->set->property->value.node;
     UCX_TEST_ASSERT(
             p2set1->type == WS_NODE_TEXT,
             "p2: set property 1: wrong type");
@@ -273,7 +273,7 @@
             !strcmp((char*)p2set1->content, "test"),
             "p2: set property 1: wrong value");
     
-    WSXmlNode *p2set3 = p2->set->next->next->property->value;
+    WSXmlNode *p2set3 = p2->set->next->next->property->value.node;
     UCX_TEST_ASSERT(p2set3, "p2: set property 3 missing");
     UCX_TEST_ASSERT(
             p2set3->type == WS_NODE_TEXT,
@@ -382,6 +382,22 @@
     
     WebdavProperty p1;
     WebdavProperty p[16];
+    const char *names[] = {"a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9"};
+    
+    // init test data
+    p1.namespace = webdav_dav_namespace();
+    p1.lang = NULL;
+    p1.name = "test1";
+    p1.value.data = NULL;
+    p1.vtype = 0;
+    
+    for(int i=0;i<8;i++) {
+        p[i].namespace = webdav_dav_namespace();
+        p[i].name = names[i];
+        p[i].lang = NULL;
+        p[i].value.node = NULL;
+        p[1].vtype = 0;
+    }
     
     UCX_TEST_ASSERT(!r->plist_begin && !r->plist_end, "plist not empty");
     

mercurial