dav/main.c

changeset 123
806c4dccf2ae
parent 119
451607eeff05
child 124
41939c8f3f9c
equal deleted inserted replaced
122:9a016d5fa9e7 123:806c4dccf2ae
48 48
49 static void xmlerrorfnc(void * c, const char * msg, ... ) { 49 static void xmlerrorfnc(void * c, const char * msg, ... ) {
50 // nothing 50 // nothing
51 } 51 }
52 52
53 //#define DO_THE_TEST 53 #define DO_THE_TEST
54 #include <libidav/davqlparser.h> 54 #include <libidav/davqlparser.h>
55 #include <libidav/davqlexec.h>
55 void test() { 56 void test() {
56 DavQLStatement *stmt = dav_parse_statement(S( 57 DavQLStatement *stmt = dav_parse_statement(S(
57 "get - from '/path/with space' with depth = %d")); 58 "get * from / where (better or func(x, y, 1+1)) and -a = 2"));
59
60 DavSession *sn = dav_session_new(ctx, "http://test/");
61 dav_statement_exec(sn, stmt);
58 dav_debug_statement(stmt); 62 dav_debug_statement(stmt);
59 dav_free_statement(stmt); 63 dav_free_statement(stmt);
60 } 64 }
61 65
62 int main(int argc, char **argv) { 66 int main(int argc, char **argv) {

mercurial