Skip to content

Commit 81a2c21

Browse files
committed
added test parse_div_infix_propagates_parse_error()
1 parent bada516 commit 81a2c21

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tests/sqlparser_mysql.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3627,6 +3627,15 @@ fn parse_div_infix() {
36273627
mysql().verified_stmt(r#"SELECT 5 DIV 2"#);
36283628
}
36293629

3630+
#[test]
3631+
fn parse_div_infix_propagates_parse_error() {
3632+
let err = mysql()
3633+
.parse_sql_statements("SELECT 5 DIV")
3634+
.expect_err("expected an error");
3635+
dbg!(&err);
3636+
assert_matches!(err, ParserError::ParserError(_));
3637+
}
3638+
36303639
#[test]
36313640
fn parse_drop_temporary_table() {
36323641
let sql = "DROP TEMPORARY TABLE foo";

0 commit comments

Comments
 (0)