|
21 | 21 | use pretty_assertions::assert_eq; |
22 | 22 |
|
23 | 23 | use sqlparser::{ |
24 | | - ast::{BinaryOperator, Expr, Ident, QuoteDelimitedString, Value, ValueWithSpan}, dialect::OracleDialect, parser::ParserError, tokenizer::Span |
| 24 | + ast::{BinaryOperator, Expr, Ident, QuoteDelimitedString, Value, ValueWithSpan}, |
| 25 | + dialect::OracleDialect, |
| 26 | + parser::ParserError, |
| 27 | + tokenizer::Span, |
25 | 28 | }; |
26 | 29 | use test_utils::{expr_from_projection, number, TestedDialects}; |
27 | 30 |
|
@@ -188,19 +191,28 @@ fn parse_invalid_quote_delimited_strings() { |
188 | 191 | for q in [' ', '\t', '\r', '\n'] { |
189 | 192 | assert_eq!( |
190 | 193 | oracle().parse_sql_statements(&format!("SELECT Q'{q}abc{q}' FROM dual")), |
191 | | - Err(ParserError::TokenizerError("Invalid space, tab, newline, or EOF after 'Q'' at Line: 1, Column: 10".into())), |
192 | | - "with quote char {q:?}"); |
| 194 | + Err(ParserError::TokenizerError( |
| 195 | + "Invalid space, tab, newline, or EOF after 'Q'' at Line: 1, Column: 10".into() |
| 196 | + )), |
| 197 | + "with quote char {q:?}" |
| 198 | + ); |
193 | 199 | } |
194 | 200 | // ~ invalid eof after quote |
195 | 201 | assert_eq!( |
196 | 202 | oracle().parse_sql_statements("SELECT Q'"), |
197 | | - Err(ParserError::TokenizerError("Invalid space, tab, newline, or EOF after 'Q'' at Line: 1, Column: 10".into())), |
198 | | - "with EOF quote char"); |
| 203 | + Err(ParserError::TokenizerError( |
| 204 | + "Invalid space, tab, newline, or EOF after 'Q'' at Line: 1, Column: 10".into() |
| 205 | + )), |
| 206 | + "with EOF quote char" |
| 207 | + ); |
199 | 208 | // ~ unterminated string |
200 | 209 | assert_eq!( |
201 | 210 | oracle().parse_sql_statements("SELECT Q'|asdfa...."), |
202 | | - Err(ParserError::TokenizerError("Unterminated string literal at Line: 1, Column: 9".into())), |
203 | | - "with EOF quote char"); |
| 211 | + Err(ParserError::TokenizerError( |
| 212 | + "Unterminated string literal at Line: 1, Column: 9".into() |
| 213 | + )), |
| 214 | + "with EOF quote char" |
| 215 | + ); |
204 | 216 | } |
205 | 217 |
|
206 | 218 | #[test] |
|
0 commit comments