修正测试发现的bug

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@963 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-10-14 07:53:18 +00:00
parent eb3a55dc19
commit 7dc402e29d
4 changed files with 58 additions and 30 deletions
@@ -0,0 +1,26 @@
package com.alibaba.druid.bvt.sql.oracle;
import com.alibaba.druid.sql.ast.statement.SQLSelectStatement;
import com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser;
import com.alibaba.druid.sql.test.TestUtils;
import junit.framework.Assert;
import junit.framework.TestCase;
public class OracleTest2 extends TestCase {
public void test_isEmpty() throws Exception {
String sql = "SELECT NAME FROM V$ARCHIVED_LOG;";
String expect = "SELECT NAME\nFROM V$ARCHIVED_LOG;\n";
OracleStatementParser parser = new OracleStatementParser(sql);
SQLSelectStatement stmt = (SQLSelectStatement) parser.parseStatementList().get(0);
String text = TestUtils.output(stmt);
Assert.assertEquals(expect, text);
System.out.println(text);
}
}