From f9fb4bedfb64b038c222eb0b9983eda98f57c5a4 Mon Sep 17 00:00:00 2001 From: Justin Haug Date: Mon, 22 Apr 2019 17:52:15 -0400 Subject: [PATCH] Move wildcard test to generic parser --- tests/sqlparser_ansi.rs | 13 ------------- tests/sqlparser_generic.rs | 5 +++++ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/tests/sqlparser_ansi.rs b/tests/sqlparser_ansi.rs index 6ffbd9b4..73054fb7 100644 --- a/tests/sqlparser_ansi.rs +++ b/tests/sqlparser_ansi.rs @@ -20,16 +20,3 @@ fn parse_simple_select() { _ => assert!(false), } } - -#[test] -fn roundtrip_qualified_wildcard() { - let sql = String::from("SELECT COUNT(Employee.*) FROM northwind.Order JOIN northwind.Employee ON Order.employee = Employee.id"); - let ast = Parser::parse_sql(&AnsiSqlDialect {}, sql.clone()).unwrap(); - assert_eq!(1, ast.len()); - match ast.first().unwrap() { - SQLStatement::SQLSelect(ref query) => { - assert_eq!(sql, query.to_string()); - } - _ => assert!(false), - } -} diff --git a/tests/sqlparser_generic.rs b/tests/sqlparser_generic.rs index e0466e5e..d7b14bf2 100644 --- a/tests/sqlparser_generic.rs +++ b/tests/sqlparser_generic.rs @@ -91,6 +91,11 @@ fn parse_select_wildcard() { ); } +#[test] +fn parse_count_wildcard() { + verified_only_select("SELECT COUNT(Employee.*) FROM Order JOIN Employee ON Order.employee = Employee.id"); +} + #[test] fn parse_column_aliases() { let sql = "SELECT a.col + 1 AS newname FROM foo AS a";