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 #include <libidav/davqlexec.h> |
56 void test() { |
56 void test() { |
57 DavQLStatement *stmt = dav_parse_statement(S( |
57 DavQLStatement *stmt = dav_parse_statement(S( |
58 "get * from / where (better or func(x, y, 1+1)) and -a = 2")); |
58 "get * from / where name unlike '%d.%s'")); |
59 |
59 |
60 DavSession *sn = dav_session_new(ctx, "http://test/"); |
60 DavSession *sn = dav_session_new(ctx, "http://test/"); |
61 dav_statement_exec(sn, stmt); |
61 dav_statement_exec(sn, stmt, 123, "txt"); |
62 dav_debug_statement(stmt); |
62 dav_debug_statement(stmt); |
63 dav_free_statement(stmt); |
63 dav_free_statement(stmt); |
64 } |
64 } |
65 |
65 |
66 int main(int argc, char **argv) { |
66 int main(int argc, char **argv) { |