mirror of
https://github.com/spf13/viper
synced 2025-05-07 12:47:18 +00:00
Changed assertion in TestDirsSearch to use filepath.Base instead of path.Base for Windows backslashes
This commit is contained in:
parent
d86fb2e6af
commit
d874efd794
1 changed files with 2 additions and 1 deletions
|
@ -14,6 +14,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path"
|
"path"
|
||||||
|
"path/filepath"
|
||||||
"reflect"
|
"reflect"
|
||||||
"runtime"
|
"runtime"
|
||||||
"sort"
|
"sort"
|
||||||
|
@ -875,7 +876,7 @@ func TestDirsSearch(t *testing.T) {
|
||||||
err = v.ReadInConfig()
|
err = v.ReadInConfig()
|
||||||
assert.Nil(t, err)
|
assert.Nil(t, err)
|
||||||
|
|
||||||
assert.Equal(t, `value is `+path.Base(v.configPaths[0]), v.GetString(`key`))
|
assert.Equal(t, `value is `+filepath.Base(v.configPaths[0]), v.GetString(`key`))
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestWrongDirsSearchNotFound(t *testing.T) {
|
func TestWrongDirsSearchNotFound(t *testing.T) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue