mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-08 03:00:26 +08:00
修复当数据库设置为lower_case_table_names=1时无法查询访问日志的Bug
This commit is contained in:
@@ -2,9 +2,21 @@
|
||||
|
||||
package utils
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"github.com/iwind/TeaGo/assert"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestSplitStrings(t *testing.T) {
|
||||
t.Log(SplitStrings("a, b, c", ","))
|
||||
t.Log(SplitStrings("a, b, c, ", ","))
|
||||
}
|
||||
|
||||
func TestContainsStringInsensitive(t *testing.T) {
|
||||
var a = assert.NewAssertion(t)
|
||||
a.IsTrue(ContainsStringInsensitive([]string{"a", "b", "C"}, "A"))
|
||||
a.IsTrue(ContainsStringInsensitive([]string{"a", "b", "C"}, "b"))
|
||||
a.IsTrue(ContainsStringInsensitive([]string{"a", "b", "C"}, "c"))
|
||||
a.IsFalse(ContainsStringInsensitive([]string{"a", "b", "C"}, "d"))
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user