mirror of
https://github.com/cloudreve/cloudreve.git
synced 2025-11-02 11:42:22 +08:00
Feat: Get file for oss handler
This commit is contained in:
@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user