Skip to content

Commit f46b07e

Browse files
committed
test: parsing error
1 parent d93ec4d commit f46b07e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/sqlparser_postgres.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,4 +1498,10 @@ fn parse_escaped_literal_string() {
14981498
&Expr::Value(Value::EscapedStringLiteral("foo \\".to_string())),
14991499
expr_from_projection(&select.projection[5])
15001500
);
1501+
1502+
let sql = r#"SELECT E'\'"#;
1503+
assert_eq!(
1504+
pg().parse_sql_statements(sql).unwrap_err().to_string(),
1505+
"sql parser error: Unterminated encoded string literal at Line: 1, Column 8"
1506+
);
15011507
}

0 commit comments

Comments
 (0)