From eae1191904fd739cdffdd2903509a44a35c4c2f2 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 6 Aug 2015 15:18:32 +0100 Subject: cmd/utils: fix path expansion on windows --- cmd/utils/customflags_test.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'cmd/utils/customflags_test.go') diff --git a/cmd/utils/customflags_test.go b/cmd/utils/customflags_test.go index 0fb0af63b..de39ca36a 100644 --- a/cmd/utils/customflags_test.go +++ b/cmd/utils/customflags_test.go @@ -23,18 +23,15 @@ import ( ) func TestPathExpansion(t *testing.T) { - user, _ := user.Current() - tests := map[string]string{ "/home/someuser/tmp": "/home/someuser/tmp", "~/tmp": user.HomeDir + "/tmp", + "~thisOtherUser/b/": "~thisOtherUser/b", "$DDDXXX/a/b": "/tmp/a/b", "/a/b/": "/a/b", } - os.Setenv("DDDXXX", "/tmp") - for test, expected := range tests { got := expandPath(test) if got != expected { -- cgit v1.2.3