mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
修正输出格式
git-svn-id: http://code.alibabatech.com/svn/druid/trunk@175 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
+1
-1
@@ -35,7 +35,7 @@ public class EncryptionAndCompressionFunctionsTest extends TestCase {
|
||||
|
||||
String text = output(stmtList);
|
||||
|
||||
Assert.assertEquals("INSERT INTO t VALUES (1, AES_ENCRYPT('text', 'password'));", text);
|
||||
Assert.assertEquals("INSERT INTO t\nVALUES\n(1, AES_ENCRYPT('text', 'password'));", text);
|
||||
}
|
||||
|
||||
public void test_1() throws Exception {
|
||||
|
||||
@@ -35,7 +35,7 @@ public class InsertSyntaxTest extends TestCase {
|
||||
|
||||
String text = output(stmtList);
|
||||
|
||||
Assert.assertEquals("INSERT INTO tbl_name VALUES ();", text);
|
||||
Assert.assertEquals("INSERT INTO tbl_name\nVALUES\n();", text);
|
||||
}
|
||||
|
||||
public void test_1() throws Exception {
|
||||
@@ -46,7 +46,7 @@ public class InsertSyntaxTest extends TestCase {
|
||||
|
||||
String text = output(stmtList);
|
||||
|
||||
Assert.assertEquals("INSERT INTO tbl_name (col1, col2) VALUES (15, col1 * 2);", text);
|
||||
Assert.assertEquals("INSERT INTO tbl_name\n\t(col1, col2)\nVALUES\n(15, col1 * 2);", text);
|
||||
}
|
||||
|
||||
public void test_2() throws Exception {
|
||||
@@ -57,7 +57,7 @@ public class InsertSyntaxTest extends TestCase {
|
||||
|
||||
String text = output(stmtList);
|
||||
|
||||
Assert.assertEquals("INSERT INTO tbl_name (col1, col2) VALUES (col2 * 2, 15);", text);
|
||||
Assert.assertEquals("INSERT INTO tbl_name\n\t(col1, col2)\nVALUES\n(col2 * 2, 15);", text);
|
||||
}
|
||||
|
||||
public void test_3() throws Exception {
|
||||
@@ -68,7 +68,7 @@ public class InsertSyntaxTest extends TestCase {
|
||||
|
||||
String text = output(stmtList);
|
||||
|
||||
Assert.assertEquals("INSERT INTO tbl_name (a, b, c) VALUES (1, 2, 3), (4, 5, 6), (7, 8, 9);", text);
|
||||
Assert.assertEquals("INSERT INTO tbl_name\n\t(a, b, c)\nVALUES\n(1, 2, 3), (4, 5, 6), (7, 8, 9);", text);
|
||||
}
|
||||
|
||||
public void test_4() throws Exception {
|
||||
@@ -79,7 +79,7 @@ public class InsertSyntaxTest extends TestCase {
|
||||
|
||||
String text = output(stmtList);
|
||||
|
||||
Assert.assertEquals("INSERT INTO tbl_name (a, b, c) VALUES (1, 2, 3, 4, 5, 6, 7, 8, 9);", text);
|
||||
Assert.assertEquals("INSERT INTO tbl_name\n\t(a, b, c)\nVALUES\n(1, 2, 3, 4, 5\n\t, 6, 7, 8, 9);", text);
|
||||
}
|
||||
|
||||
public void test_5() throws Exception {
|
||||
@@ -90,7 +90,7 @@ public class InsertSyntaxTest extends TestCase {
|
||||
|
||||
String text = output(stmtList);
|
||||
|
||||
Assert.assertEquals("INSERT LOW_PRIORITY DELAYED HIGH_PRIORITY IGNORE INTO tbl_name (a, b, c) VALUES (1, 2, 3);", text);
|
||||
Assert.assertEquals("INSERT LOW_PRIORITY DELAYED HIGH_PRIORITY IGNORE INTO tbl_name\n\t(a, b, c)\nVALUES\n(1, 2, 3);", text);
|
||||
}
|
||||
|
||||
public void test_6() throws Exception {
|
||||
@@ -101,7 +101,7 @@ public class InsertSyntaxTest extends TestCase {
|
||||
|
||||
String text = output(stmtList);
|
||||
|
||||
Assert.assertEquals("INSERT INTO tbl_name (a, b, c) VALUES (1, 2, 3) ON DUPLICATE KEY UPDATE c = c + 1;", text);
|
||||
Assert.assertEquals("INSERT INTO tbl_name\n\t(a, b, c)\nVALUES\n(1, 2, 3) ON DUPLICATE KEY UPDATE c = c + 1;", text);
|
||||
}
|
||||
|
||||
private String output(List<SQLStatement> stmtList) {
|
||||
|
||||
Reference in New Issue
Block a user