From 08394389d3c95661350600d14d32a095e48e7e43 Mon Sep 17 00:00:00 2001 From: Egon Elbre Date: Thu, 13 Dec 2018 16:34:38 +0200 Subject: [PATCH] Fix ConfNested on Windows (#851) --- pkg/cfgstruct/bind_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/cfgstruct/bind_test.go b/pkg/cfgstruct/bind_test.go index 574f38334..e0d717cbf 100644 --- a/pkg/cfgstruct/bind_test.go +++ b/pkg/cfgstruct/bind_test.go @@ -6,6 +6,7 @@ package cfgstruct import ( "flag" "fmt" + "path/filepath" "reflect" "testing" "time" @@ -105,6 +106,6 @@ func TestNesting(t *testing.T) { } Bind(f, &c, ConfDirNested("confpath")) assertEqual(f.Lookup("string").DefValue, "-confpath+") - assertEqual(f.Lookup("my-struct1.string").DefValue, "1confpath/my-struct12") - assertEqual(f.Lookup("my-struct1.my-struct2.string").DefValue, "2confpath/my-struct1/my-struct23") + assertEqual(f.Lookup("my-struct1.string").DefValue, filepath.FromSlash("1confpath/my-struct12")) + assertEqual(f.Lookup("my-struct1.my-struct2.string").DefValue, filepath.FromSlash("2confpath/my-struct1/my-struct23")) }