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,19 @@
|
||||
package com.alibaba.druid.bvt.sql.mysql;
|
||||
|
||||
import com.alibaba.druid.sql.SQLUtils;
|
||||
import com.alibaba.druid.util.JdbcUtils;
|
||||
|
||||
import junit.framework.Assert;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class MySqlFormatTest extends TestCase {
|
||||
|
||||
public void test_0() throws Exception {
|
||||
String text = "CREATE TABLE customer (a INT, b CHAR (20), INDEX (a));";
|
||||
Assert.assertEquals("CREATE TABLE customer (\n" + //
|
||||
"\ta INT, \n" + //
|
||||
"\tb CHAR(20), \n" + //
|
||||
"\tINDEX(a)\n" + //
|
||||
")", SQLUtils.format(text, JdbcUtils.MYSQL));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user