mirror of
https://github.com/spf13/viper
synced 2024-12-23 20:17:03 +00:00
Fixed tests not passing on Windows
This commit is contained in:
parent
5ed0fc31f7
commit
3968772673
1 changed files with 9 additions and 2 deletions
|
@ -11,8 +11,9 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
path "path/filepath"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
"runtime"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
@ -183,10 +184,16 @@ func initHcl() {
|
||||||
func initDirs(t *testing.T) (string, string, func()) {
|
func initDirs(t *testing.T) (string, string, func()) {
|
||||||
|
|
||||||
var (
|
var (
|
||||||
testDirs = []string{`a a`, `b`, `c\c`, `D_`}
|
testDirs []string
|
||||||
config = `improbable`
|
config = `improbable`
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if runtime.GOOS == "windows" {
|
||||||
|
testDirs = []string{`a a`, `b`, `D_`}
|
||||||
|
} else {
|
||||||
|
testDirs = []string{`a a`, `b`, `c\c`, `D_`}
|
||||||
|
}
|
||||||
|
|
||||||
root, err := ioutil.TempDir("", "")
|
root, err := ioutil.TempDir("", "")
|
||||||
|
|
||||||
cleanup := true
|
cleanup := true
|
||||||
|
|
Loading…
Reference in a new issue