Skip to content

Commit 610091e

Browse files
committed
feat: Applies PR review suggestion
1 parent d4b0901 commit 610091e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

query-grammar/src/query_grammar.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,4 +1693,15 @@ mod test {
16931693
fn test_invalid_field() {
16941694
test_is_parse_err(r#"!bc:def"#, "!bc:def");
16951695
}
1696+
1697+
#[test]
1698+
fn test_space_before_value() {
1699+
test_parse_query_to_ast_helper("field : a", r#""field":a"#);
1700+
test_parse_query_to_ast_helper("field: a", r#""field":a"#);
1701+
test_parse_query_to_ast_helper("field :a", r#""field":a"#);
1702+
test_parse_query_to_ast_helper(
1703+
"field : 'happy tax payer' AND other_field : 1",
1704+
r#"(+"field":'happy tax payer' +"other_field":1)"#,
1705+
);
1706+
}
16961707
}

0 commit comments

Comments
 (0)