src/server/test/main.c

branch
webdav
changeset 211
2160585200ac
parent 198
2f845b5bda9d
child 214
4d7ac67a1c14
equal deleted inserted replaced
210:21274e5950af 211:2160585200ac
1 /* 1 /*
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3 * 3 *
4 * Copyright 2013 Olaf Wintermann. All rights reserved. 4 * Copyright 2019 Olaf Wintermann. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
37 #include "../util/pool.h" 37 #include "../util/pool.h"
38 #include "../public/nsapi.h" 38 #include "../public/nsapi.h"
39 #include "../util/plist.h" 39 #include "../util/plist.h"
40 #include "../util/date.h" 40 #include "../util/date.h"
41 41
42 #include "../../ucx/string.h" 42 #include <ucx/test.h>
43 43
44 static int std_pipe_fds[2]; 44 #include "webdav.h"
45 static WSBool is_daemon;
46 45
47 void test() { 46 void test() {
48 47
49 } 48 }
50 49
51 // needed for linking 50 // needed for linking
52 WSBool main_is_daemon(void) { 51 WSBool main_is_daemon(void) {
53 return is_daemon; 52 return 0;
54 } 53 }
55 54
56 int main(int argc, char **argv) { 55 int main(int argc, char **argv) {
57 pool_init(NULL, NULL, NULL); 56 pool_init(NULL, NULL, NULL);
58 57
59 //test(); 58 //test();
60 59
61 printf("%s", "Webserver Test Suite\n====================\n\n"); 60 printf("%s", "Webserver Test Suite\n====================\n\n");
62 61
62 UcxTestSuite* suite = ucx_test_suite_new();
63
64 // webdav tests
65 ucx_test_register(suite, test_propfind_parse);
66 ucx_test_register(suite, test_proppatch_parse);
67 ucx_test_register(suite, test_lock_parse);
68 ucx_test_register(suite, test_rqbody2buffer);
69 ucx_test_register(suite, test_msresponse_addproperty);
70
71 // run tests
72 ucx_test_run(suite, stdout);
73 fflush(stdout);
74
63 return EXIT_SUCCESS; 75 return EXIT_SUCCESS;
64 } 76 }
65 77

mercurial