mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
add testcase
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user