File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,12 @@ string extractQuery(string query) {
3939 }
4040}
4141unittest {
42- const nakedQueries = [" {and: [[foo]] [[bar]] }" , " {or: [[foo]] [[bar]] }" ];
42+ const nakedQueries = [
43+ " {and: [[foo]] [[bar]] }" ,
44+ " {or: [[foo]] [[bar]] }" ,
45+ " {and: [[foo]] [[bar]]}" ,
46+ " {and: [[foo]] {and: [[bar]] [[spam]]}}"
47+ ];
4348 foreach (nakedQuery; nakedQueries) {
4449 assert (extractQuery(nakedQuery) == nakedQuery);
4550 assert (extractQuery(" {{query:" ~ nakedQuery ~ " }}" ) == nakedQuery);
@@ -156,7 +161,7 @@ int main(string[] args) {
156161 // Read query immediately. If the user has written an invalid query, show
157162 // an error before we read in all files.
158163 ubyte n = 0 ;
159- ParsedQuery qu = booleanQuery(query, n);
164+ ParsedQuery qu = booleanQuery(extractQuery( query) , n);
160165 string [] inputs;
161166 string [] inputnames;
162167 if (args.length == 0 ) {
You can’t perform that action at this time.
0 commit comments