summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 06622be)
raw | patch | inline | side by side (parent: 06622be)
author | Sebastian Harl <sh@tokkee.org> | |
Tue, 8 Apr 2014 12:29:07 +0000 (14:29 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Tue, 8 Apr 2014 12:29:07 +0000 (14:29 +0200) |
t/frontend/parser_test.c | patch | blob | history |
index 74075b3a6c8de866840891e52d975fdc0fdc35ba..f64b9ebca95b05e66bb568a9c6535f72cc7f7462 100644 (file)
--- a/t/frontend/parser_test.c
+++ b/t/frontend/parser_test.c
/* valid expressions */
{ "host.name = 'localhost'", -1, MATCHER_HOST },
+ { "host.name != 'localhost'", -1, MATCHER_NOT },
+ { "host.name =~ 'host'", -1, MATCHER_HOST },
+ { "host.name !~ 'host'", -1, MATCHER_NOT },
{ "host.name = 'localhost' -- foo", -1, MATCHER_HOST },
{ "host.name = 'host' <garbage>", 18, MATCHER_HOST },
+ /* match hosts by service */
+ { "service.name = 'name'", -1, MATCHER_HOST },
+ { "service.name != 'name'", -1, MATCHER_NOT },
+ { "service.name =~ 'pattern'", -1, MATCHER_HOST },
+ { "service.name !~ 'pattern'", -1, MATCHER_NOT },
+ /* match hosts by attribute */
+ { "attribute.name = 'name'", -1, MATCHER_HOST },
+ { "attribute.name != 'name'", -1, MATCHER_NOT },
+ { "attribute.name =~ 'pattern'", -1, MATCHER_HOST },
+ { "attribute.name !~ 'pattern'", -1, MATCHER_NOT },
+ /* composite expressions */
{ "host.name =~ 'pattern' AND "
"service.name =~ 'pattern'", -1, MATCHER_AND },
{ "host.name =~ 'pattern' OR "