mirror of
https://github.com/spf13/viper
synced 2025-05-06 20:27:17 +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/exec"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"runtime"
|
||||
"sort"
|
||||
|
@ -875,7 +876,7 @@ func TestDirsSearch(t *testing.T) {
|
|||
err = v.ReadInConfig()
|
||||
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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue