Fix tests on Windows
This commit is contained in:
parent
72add5ab27
commit
da2e2544ee
1 changed files with 5 additions and 2 deletions
|
@ -13,6 +13,7 @@ import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
|
"path/filepath"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
@ -147,9 +148,11 @@ func TestFsRoot(t *testing.T) {
|
||||||
name := remote.Name() + ":"
|
name := remote.Name() + ":"
|
||||||
root := remote.Root()
|
root := remote.Root()
|
||||||
if isLocalRemote {
|
if isLocalRemote {
|
||||||
name = ""
|
// only check last path element on local
|
||||||
|
require.Equal(t, filepath.Base(subRemoteName), filepath.Base(root))
|
||||||
|
} else {
|
||||||
|
require.Equal(t, subRemoteName, name+root)
|
||||||
}
|
}
|
||||||
require.Equal(t, subRemoteName, name+root)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestFsRmdirEmpty tests deleting an empty directory
|
// TestFsRmdirEmpty tests deleting an empty directory
|
||||||
|
|
Loading…
Add table
Reference in a new issue