re-introduce test using postgres dialect

This commit is contained in:
Simon Vandel Sillesen 2025-07-05 21:36:46 +02:00
parent 44ceedaf05
commit 83812914bd

View file

@ -11125,8 +11125,15 @@ fn parse_trailing_comma() {
);
trailing_commas.verified_stmt(r#"SELECT "from" FROM "from""#);
// doesn't allow all trailing commas
let trailing_commas = TestedDialects::new(vec![Box::new(GenericDialect {})]);
// doesn't allow any trailing commas
let trailing_commas = TestedDialects::new(vec![Box::new(PostgreSqlDialect {})]);
assert_eq!(
trailing_commas
.parse_sql_statements("SELECT name, age, from employees;")
.unwrap_err(),
ParserError::ParserError("Expected an expression, found: from".to_string())
);
assert_eq!(
trailing_commas