Feat: Get file for oss handler

This commit is contained in:
HFO4
2020-01-16 15:50:58 +08:00
parent 286f76cbec
commit 7eda63f089
4 changed files with 178 additions and 15 deletions

View File

@ -68,3 +68,31 @@ func TestBuildConcat(t *testing.T) {
asserts.Equal("CONCAT(1,2)", BuildConcat("1", "2", "mysql"))
asserts.Equal("1||2", BuildConcat("1", "2", "sqlite3"))
}
func TestSliceDifference(t *testing.T) {
asserts := assert.New(t)
{
s1 := []string{"1", "2", "3", "4"}
s2 := []string{"2", "4"}
asserts.Equal([]string{"1", "3"}, SliceDifference(s1, s2))
}
{
s2 := []string{"1", "2", "3", "4"}
s1 := []string{"2", "4"}
asserts.Equal([]string{}, SliceDifference(s1, s2))
}
{
s1 := []string{"1", "2", "3", "4"}
s2 := []string{"1", "2", "3", "4"}
asserts.Equal([]string{}, SliceDifference(s1, s2))
}
{
s1 := []string{"1", "2", "3", "4"}
s2 := []string{}
asserts.Equal([]string{"1", "2", "3", "4"}, SliceDifference(s1, s2))
}
}