Skip to content

Commit

Permalink
Misc
Browse files Browse the repository at this point in the history
  • Loading branch information
gwenn committed Mar 15, 2024
1 parent 99049bf commit a083a16
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/lexer/sql/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@ fn count_named_placeholders() {

#[test]
fn duplicate_column() {
let r = parse(b"CREATE TABLE t (x TEXT, x TEXT)");
let Error::ParserError(ParserError::Custom(msg), _) = r.unwrap_err() else {
panic!("unexpected error type")
};
assert!(msg.contains("duplicate column name"));
expect_parser_err(
b"CREATE TABLE t (x TEXT, x TEXT)",
"duplicate column name: x",
);
}

#[test]
Expand Down

0 comments on commit a083a16

Please sign in to comment.