Browse Source

add some additional test cases to prevent bad optimizations...

During attempts to optimize the query, these cases failed, but were
not detected...
main
John-Mark Gurney 3 months ago
parent
commit
250c4a7eb5
1 changed files with 23 additions and 0 deletions
  1. +23
    -0
      ui/fixtures/cmd.search.json

+ 23
- 0
ui/fixtures/cmd.search.json View File

@@ -53,6 +53,14 @@
"cmd": [ "search", "file", "-other" ],
"stdout_re": "/newfile.txt\n$"
},
{
"title": "add tag c",
"cmd": [ "modify", "+bleh=baz", "newfile.txt" ]
},
{
"title": "add tag d",
"cmd": [ "modify", "+tag=bar", "newfile.txt" ]
},
{
"special": "set hostid",
"hostid": "ceaa4862-dd00-41ba-9787-7480ec1b2679"
@@ -79,6 +87,11 @@
"cmd": [ "search", "file", "+other" ],
"stdout_re": "^/foobar/test.txt\n$"
},
{
"title": "search other, mapped properly",
"cmd": [ "search", "file" ],
"stdout": "/foobar/newfile.txt\n/foobar/test.txt\n"
},
{
"title": "add tag with space",
"cmd": [ "modify", "+tag=car baz", "test.txt" ]
@@ -93,5 +106,15 @@
"cmd": [ "search", "lskdjflaskjdoijef", "tag" ],
"exit": 1,
"stderr": "unknown search type: 'lskdjflaskjdoijef'\n"
},
{
"title": "search exclusion properly",
"cmd": [ "search", "file", "-tag" ],
"stdout": ""
},
{
"title": "search exclusion w/ inclusion properly",
"cmd": [ "search", "file", "+tag=bar", "-other" ],
"stdout": "/foobar/newfile.txt\n"
}
]

Loading…
Cancel
Save