mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix format bug
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package org.dromara.hutool.db.sql;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class SqlFormatterTest {
|
||||
@@ -11,4 +12,15 @@ public class SqlFormatterTest {
|
||||
final String sql = "(select 1 from dual) union all (select 1 from dual)";
|
||||
SqlFormatter.format(sql);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void issue3246Test() {
|
||||
final String sql = "select * from `order`";
|
||||
final String format = SqlFormatter.format(sql);
|
||||
Assertions.assertEquals(
|
||||
"select\n" +
|
||||
" * \n" +
|
||||
" from\n" +
|
||||
" `order`", format);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user