From d86fb2e6af611af7a004a9dd48717195e0539631 Mon Sep 17 00:00:00 2001 From: inkychris Date: Sat, 16 Mar 2019 13:20:04 +0000 Subject: [PATCH] Modified testDirs list in initDirs to avoid invalid path on Windows --- viper_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/viper_test.go b/viper_test.go index c152992..9a0d4be 100644 --- a/viper_test.go +++ b/viper_test.go @@ -191,10 +191,14 @@ func initHcl() { func initDirs(t *testing.T) (string, string, func()) { var ( - testDirs = []string{`a a`, `b`, `c\c`, `D_`} + testDirs = []string{`a a`, `b`, `C_`} config = `improbable` ) + if runtime.GOOS != "windows" { + testDirs = append(testDirs, `d\d`) + } + root, err := ioutil.TempDir("", "") require.NoError(t, err, "Failed to create temporary directory")