diff options
author | Michael Muré <batolettre@gmail.com> | 2020-03-28 17:17:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-28 17:17:13 +0100 |
commit | 390e66eb2b3a7088cdb8a44eeaf384fe691daf4a (patch) | |
tree | 05386ddf08d7e1c2947a6fc6cf2fbd44efa19eaf /cache/query_test.go | |
parent | 58abc6b0a35b679ac0c34579ff1cb53c8fa71af4 (diff) | |
parent | 314fcbb2293d869c33d6a76aedd148aedff6561d (diff) | |
download | git-bug-390e66eb2b3a7088cdb8a44eeaf384fe691daf4a.tar.gz |
Merge pull request #355 from MichaelMure/query-parser-ast
replace the all-in-one query parser by a complete one with AST/lexer/parser
Diffstat (limited to 'cache/query_test.go')
-rw-r--r-- | cache/query_test.go | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/cache/query_test.go b/cache/query_test.go deleted file mode 100644 index 9ae62ac4..00000000 --- a/cache/query_test.go +++ /dev/null @@ -1,41 +0,0 @@ -package cache - -import "testing" - -func TestQueryParse(t *testing.T) { - - var tests = []struct { - input string - ok bool - }{ - {"gibberish", false}, - - {"status:", false}, - - {"status:open", true}, - {"status:closed", true}, - {"status:unknown", false}, - - {"author:rene", true}, - {`author:"René Descartes"`, true}, - - {"actor:bernhard", true}, - {"participant:leonhard", true}, - - {"label:hello", true}, - {`label:"Good first issue"`, true}, - - {"title:titleOne", true}, - {`title:"Bug titleTwo"`, true}, - - {"sort:edit", true}, - {"sort:unknown", false}, - } - - for _, test := range tests { - _, err := ParseQuery(test.input) - if (err == nil) != test.ok { - t.Fatalf("Unexpected parse result, expected: %v, err: %v", test.ok, err) - } - } -} |