Skip to content

Commit 8381291

Browse files
committed
re-introduce test using postgres dialect
1 parent 44ceeda commit 8381291

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

tests/sqlparser_common.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11125,8 +11125,15 @@ fn parse_trailing_comma() {
1112511125
);
1112611126
trailing_commas.verified_stmt(r#"SELECT "from" FROM "from""#);
1112711127

11128-
// doesn't allow all trailing commas
11129-
let trailing_commas = TestedDialects::new(vec![Box::new(GenericDialect {})]);
11128+
// doesn't allow any trailing commas
11129+
let trailing_commas = TestedDialects::new(vec![Box::new(PostgreSqlDialect {})]);
11130+
11131+
assert_eq!(
11132+
trailing_commas
11133+
.parse_sql_statements("SELECT name, age, from employees;")
11134+
.unwrap_err(),
11135+
ParserError::ParserError("Expected an expression, found: from".to_string())
11136+
);
1113011137

1113111138
assert_eq!(
1113211139
trailing_commas

0 commit comments

Comments
 (0)