Fix testcase

This commit is contained in:
damnever 2017-05-13 18:43:37 +08:00
parent 1aa8d3cf88
commit 42f2286b63
No known key found for this signature in database
GPG Key ID: 54C374B5A76DC1A4

View File

@ -42,7 +42,7 @@ func TestParseFromMultipleGopath(t *testing.T) {
} }
gopath := gopaths[len(gopaths)-1] gopath := gopaths[len(gopaths)-1]
dir := filepath.Join(gopath, "src", "foo") dir := filepath.Join(gopath, "src", "foo")
defer must(t, os.RemoveAll(dir)) defer func() { must(t, os.RemoveAll(dir)) }()
must(t, os.MkdirAll(dir, 0755)) must(t, os.MkdirAll(dir, 0755))
must(t, ioutil.WriteFile(filepath.Join(dir, "main.go"), []byte(fakeCode), 0644)) must(t, ioutil.WriteFile(filepath.Join(dir, "main.go"), []byte(fakeCode), 0644))