Bert Frees | 111e702 | 2015-02-10 12:57:05 +0100 | [diff] [blame] | 1 | #include <stdio.h> |
| 2 | #include <string.h> |
| 3 | #include <stdlib.h> |
| 4 | #include <unistd.h> |
| 5 | #include "louis.h" |
| 6 | |
| 7 | int |
| 8 | main(int argc, char **argv) |
| 9 | { |
| 10 | int success = 0; |
| 11 | char * match; |
Bert Frees | 17a7ad1 | 2015-03-09 20:41:05 +0100 | [diff] [blame] | 12 | const char * tables[] = {"tablesWithMetadata/foo","tablesWithMetadata/bar",NULL}; |
Bert Frees | 111e702 | 2015-02-10 12:57:05 +0100 | [diff] [blame] | 13 | lou_setLogLevel(LOG_DEBUG); |
Bert Frees | 17a7ad1 | 2015-03-09 20:41:05 +0100 | [diff] [blame] | 14 | lou_indexTables(tables); |
Bert Frees | 111e702 | 2015-02-10 12:57:05 +0100 | [diff] [blame] | 15 | match = lou_findTable("id:foo"); |
Christian Egli | 2942c1b | 2015-05-29 14:11:11 +0200 | [diff] [blame^] | 16 | success |= (!match || (strstr(match, "tablesWithMetadata/foo") == NULL)); |
Bert Frees | 111e702 | 2015-02-10 12:57:05 +0100 | [diff] [blame] | 17 | match = lou_findTable("language:en"); |
Christian Egli | 2942c1b | 2015-05-29 14:11:11 +0200 | [diff] [blame^] | 18 | success |= (!match || (strstr(match, "tablesWithMetadata/bar") == NULL)); |
Bert Frees | 111e702 | 2015-02-10 12:57:05 +0100 | [diff] [blame] | 19 | return success; |
| 20 | } |