private static Parser parser(SQLStatement<?> s) throws Exception {
return new Parser(new StringReader(s.toString()));
}
public void testParse() throws Exception {
List<SQLStatement<?>> statements = new Parser(getClass().getResourceAsStream("GoodParseAll.sql")).SQLFile();
for (SQLStatement<?> statement: statements) {
System.err.println(statement);
}
Iterator<SQLStatement<?>> stmtIt = statements.iterator();
assertTrue("has more statements", stmtIt.hasNext());