add testcase

This commit is contained in:
shaojin.wensj
2015-07-11 23:09:39 +08:00
parent aecd9aeed7
commit a0ad1cda0c
4 changed files with 22 additions and 2 deletions
@@ -0,0 +1,17 @@
package com.alibaba.druid.bvt.sql.odps;
import org.junit.Assert;
import com.alibaba.druid.sql.SQLUtils;
import junit.framework.TestCase;
public class OdpsAsNumberFirstTest extends TestCase {
public void test_0() throws Exception {
String sql = "select id as 39dd"
+ "\n from t1";
Assert.assertEquals("SELECT id AS 39dd" //
+ "\nFROM t1", SQLUtils.formatOdps(sql));
}
}
@@ -37,6 +37,8 @@ import com.alibaba.druid.util.Utils;
public class OdpsSelectTest extends TestCase {
public void test_0() throws Exception {
exec_test("bvt/parser/odps-1.sql");
exec_test("bvt/parser/odps-2.sql");
exec_test("bvt/parser/odps-3.sql");
}