X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=t%2Funit%2Fparser%2Fparser_test.c;h=d3667d1a4b5da8c40e2e0ae804736263e3f64e7c;hp=68e152740368d029ba9dd3ad96acb5be9cd7c81d;hb=f1975b0bdc00eff623288b34961b9de7d83e7ba1;hpb=195f73cdb0c1087bf3f3a82267204fca9eb3104c diff --git a/t/unit/parser/parser_test.c b/t/unit/parser/parser_test.c index 68e1527..d3667d1 100644 --- a/t/unit/parser/parser_test.c +++ b/t/unit/parser/parser_test.c @@ -409,14 +409,21 @@ struct { * syntactically correct but semantically invalid commands */ -#if 0 /* invalid fields */ + { "LIST hosts FILTER " + "field = 'a'", -1, -1, 0, 0 }, + { "LIST services FILTER " + "field = 'a'", -1, -1, 0, 0 }, + { "LIST metrics FILTER " + "field = 'a'", -1, -1, 0, 0 }, +#if 0 { "LIST hosts FILTER " "value = 'a'", -1, -1, 0, 0 }, { "LIST services FILTER " "value = 'a'", -1, -1, 0, 0 }, { "LIST metrics FILTER " "value = 'a'", -1, -1, 0, 0 }, +#endif /* type mismatches */ { "LOOKUP hosts MATCHING " @@ -449,6 +456,7 @@ struct { "age + 1 > 0s", -1, -1, 0, 0 }, { "LOOKUP hosts MATCHING " "age - 1 > 0s", -1, -1, 0, 0 }, + /* datetime integer is allowed */ { "LOOKUP hosts MATCHING " "age || 1 > 0s", -1, -1, 0, 0 }, @@ -515,6 +523,7 @@ struct { { "LOOKUP hosts MATCHING " "ANY 'patt' =~ 'p'", -1, -1, 0, 0 }, +#if 0 /* invalid LIST commands */ { "LIST", -1, -1, 0, 0 }, { "LIST foo", -1, -1, 0, 0 },