mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for statementExecutableSqlLogEnable
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package com.alibaba.druid.bvt.sql.mysql;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.junit.Assert;
|
||||
|
||||
import com.alibaba.druid.sql.SQLUtils;
|
||||
import com.alibaba.druid.util.JdbcConstants;
|
||||
|
||||
public class SQLUtilsTest extends TestCase {
|
||||
|
||||
public void test_format() throws Exception {
|
||||
String formattedSql = SQLUtils.format("select * from t where id = ?", JdbcConstants.MYSQL,
|
||||
Arrays.<Object> asList("abc"));
|
||||
Assert.assertEquals("SELECT *" + //
|
||||
"\nFROM t" + //
|
||||
"\nWHERE id = 'abc'", formattedSql);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user