blob: 96f724f1b1a3f39bbc88311a3c0ec1e32fbe0d18 [file] [log] [blame]
Bert Frees111e7022015-02-10 12:57:05 +01001#include <stdio.h>
2#include <string.h>
3#include <stdlib.h>
4#include <unistd.h>
5#include "louis.h"
6
7int
8main(int argc, char **argv)
9{
10 int success = 0;
11 char * match;
Bert Frees17a7ad12015-03-09 20:41:05 +010012 const char * tables[] = {"tablesWithMetadata/foo","tablesWithMetadata/bar",NULL};
Bert Frees111e7022015-02-10 12:57:05 +010013 lou_setLogLevel(LOG_DEBUG);
Bert Frees17a7ad12015-03-09 20:41:05 +010014 lou_indexTables(tables);
Bert Frees111e7022015-02-10 12:57:05 +010015 match = lou_findTable("id:foo");
Christian Egli2942c1b2015-05-29 14:11:11 +020016 success |= (!match || (strstr(match, "tablesWithMetadata/foo") == NULL));
Bert Frees111e7022015-02-10 12:57:05 +010017 match = lou_findTable("language:en");
Christian Egli2942c1b2015-05-29 14:11:11 +020018 success |= (!match || (strstr(match, "tablesWithMetadata/bar") == NULL));
Bert Frees111e7022015-02-10 12:57:05 +010019 return success;
20}