mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for mysql parser.
This commit is contained in:
@@ -31,10 +31,10 @@ public class Bug_for_ruiyi extends TestCase {
|
||||
+ "\\\"title\\\":\\\"Please contact your card issuer to double confirm.\\\","
|
||||
+ "\\\"type\\\":\\\"END\\\"," + "\\\"currentLevel\\\":3}]}]}\",607)";
|
||||
|
||||
String expected = "INSERT INTO icshall_guide (id, gmt_create, gmt_modified, subject, content"
|
||||
+ "\n\t, cat_id)"
|
||||
+ "\nVALUES (8, now(), now(), \"Why my payment is deducted incorrectly?/ Why my payment is deducted twice?\", '{\"id\":1,\"title\":\"Have you contacted your card issuer to double check instead of only checking online?\",\"type\":\"START\",\"currentLevel\":1,\"name\":\"name1\",\"values\":[{\"id\":2,\"title\":\"Yes\",\"type\":\"MIDWAY\",\"currentLevel\":2,\"value\":1,\"childs\":[{\"id\":3,\"title\":\"If it is deducted twice, please contact the online service with the official bank statement.\",\"type\":\"END\",\"currentLevel\":3}]},{\"id\":4,\"title\":\"No\",\"type\":\"MIDWAY\",\"currentLevel\":2,\"value\":1,\"childs\":[{\"id\":5,\"title\":\"Please contact your card issuer to double confirm.\",\"type\":\"END\",\"currentLevel\":3}]}]}'"
|
||||
+ "\n\t, 607);\n";
|
||||
String expected = "INSERT INTO icshall_guide (id, gmt_create, gmt_modified, subject, content\n" +
|
||||
"\t, cat_id)\n" +
|
||||
"VALUES (8, now(), now(), 'Why my payment is deducted incorrectly?/ Why my payment is deducted twice?', '{\"id\":1,\"title\":\"Have you contacted your card issuer to double check instead of only checking online?\",\"type\":\"START\",\"currentLevel\":1,\"name\":\"name1\",\"values\":[{\"id\":2,\"title\":\"Yes\",\"type\":\"MIDWAY\",\"currentLevel\":2,\"value\":1,\"childs\":[{\"id\":3,\"title\":\"If it is deducted twice, please contact the online service with the official bank statement.\",\"type\":\"END\",\"currentLevel\":3}]},{\"id\":4,\"title\":\"No\",\"type\":\"MIDWAY\",\"currentLevel\":2,\"value\":1,\"childs\":[{\"id\":5,\"title\":\"Please contact your card issuer to double confirm.\",\"type\":\"END\",\"currentLevel\":3}]}]}'\n" +
|
||||
"\t, 607);\n";
|
||||
|
||||
StringBuilder out = new StringBuilder();
|
||||
MySqlOutputVisitor visitor = new MySqlOutputVisitor(out);
|
||||
|
||||
Reference in New Issue
Block a user