Skip to content

Commit

Permalink
queryparser: add field respecification test (#2550)
Browse files Browse the repository at this point in the history
  • Loading branch information
PSeitz authored Dec 2, 2024
1 parent 4c52499 commit 876a579
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions query-grammar/src/query_grammar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1497,6 +1497,11 @@ mod test {
test_is_parse_err(r#"field:(+a -"b c""#, r#"(+"field":a -"field":"b c")"#);
}

#[test]
fn field_re_specification() {
test_parse_query_to_ast_helper(r#"field:(abc AND b:cde)"#, r#"(+"field":abc +"b":cde)"#);
}

#[test]
fn test_parse_query_single_term() {
test_parse_query_to_ast_helper("abc", "abc");
Expand Down

0 comments on commit 876a579

Please sign in to comment.