mirror of
https://github.com/rclone/rclone.git
synced 2024-11-23 02:01:25 +08:00
57d5de6fba
git grep -l github.com/ncw/rclone | xargs -d'\n' perl -i~ -lpe 's|github.com/ncw/rclone|github.com/rclone/rclone|g' goimports -w `find . -name \*.go`
27 lines
612 B
Go
27 lines
612 B
Go
package fs_test
|
|
|
|
import (
|
|
"sort"
|
|
"testing"
|
|
|
|
"github.com/rclone/rclone/fs"
|
|
"github.com/rclone/rclone/fstest/mockdir"
|
|
"github.com/rclone/rclone/fstest/mockobject"
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestDirEntriesSort(t *testing.T) {
|
|
a := mockobject.New("a")
|
|
aDir := mockdir.New("a")
|
|
b := mockobject.New("b")
|
|
bDir := mockdir.New("b")
|
|
c := mockobject.New("c")
|
|
cDir := mockdir.New("c")
|
|
anotherc := mockobject.New("c")
|
|
dirEntries := fs.DirEntries{bDir, b, aDir, a, c, cDir, anotherc}
|
|
|
|
sort.Stable(dirEntries)
|
|
|
|
assert.Equal(t, fs.DirEntries{aDir, a, bDir, b, cDir, c, anotherc}, dirEntries)
|
|
}
|