content: package com.alibaba.druid.bvt.bug;
  
  import com.alibaba.druid.sql.SQLUtils;
  import junit.framework.TestCase;
  
  public class Issue_697 extends TestCase {
      public void test_for_issue() throws Exception {
          String sql = "insert into tag_rule_detail(id, gmt_create, gmt_modified, group_id, priority, rule_condition, rule_action) values(1010102, now(), now(), 10101, 0, 'flow=''trustLogin''', 'be:login,dev:pc, env:web, type:trust_login, from:$loginfrom, result:true') ;\n"
                  + "insert into tag_rule_detail(id, gmt_create, gmt_modified, group_id, priority, rule_condition, rule_action) values(1010103, now(), now(), 10101, 0, 'flow=''Ctr''', 'be:login,dev:pc, env:web, type:ctr, from:$loginfrom, result:true') ;";
  
          String expected = "INSERT INTO tag_rule_detail (id, gmt_create, gmt_modified, group_id, priority\n" +
                  "\t, rule_condition, rule_action)\n" +
                  "VALUES (1010102, now(), now(), 10101, 0\n" +
                  "\t, 'flow=''trustLogin''', 'be:login,dev:pc, env:web, type:trust_login, from:$loginfrom, result:true');\n" +
                  "\n" +
                  "INSERT INTO tag_rule_detail (id, gmt_create, gmt_modified, group_id, priority\n" +
                  "\t, rule_condition, rule_action)\n" +
                  "VALUES (1010103, now(), now(), 10101, 0\n" +
                  "\t, 'flow=''Ctr''', 'be:login,dev:pc, env:web, type:ctr, from:$loginfrom, result:true');";
  
          assertEquals(expected, SQLUtils.formatMySql(sql));
      }
  }
  