--- a/src/server/test/main.c Tue Aug 13 22:14:32 2019 +0200 +++ b/src/server/test/main.c Thu Oct 31 10:26:35 2019 +0100 @@ -1,7 +1,7 @@ /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * - * Copyright 2013 Olaf Wintermann. All rights reserved. + * Copyright 2019 Olaf Wintermann. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -39,10 +39,9 @@ #include "../util/plist.h" #include "../util/date.h" -#include "../../ucx/string.h" +#include <ucx/test.h> -static int std_pipe_fds[2]; -static WSBool is_daemon; +#include "webdav.h" void test() { @@ -50,7 +49,7 @@ // needed for linking WSBool main_is_daemon(void) { - return is_daemon; + return 0; } int main(int argc, char **argv) { @@ -59,7 +58,20 @@ //test(); printf("%s", "Webserver Test Suite\n====================\n\n"); - + + UcxTestSuite* suite = ucx_test_suite_new(); + + // webdav tests + ucx_test_register(suite, test_propfind_parse); + ucx_test_register(suite, test_proppatch_parse); + ucx_test_register(suite, test_lock_parse); + ucx_test_register(suite, test_rqbody2buffer); + ucx_test_register(suite, test_msresponse_addproperty); + + // run tests + ucx_test_run(suite, stdout); + fflush(stdout); + return EXIT_SUCCESS; }