Fixed remaining test

This commit is contained in:
notzippy@gmail.com
2020-04-26 23:00:51 -07:00
parent 86736d6e43
commit 33abc47c7a
5 changed files with 67 additions and 66 deletions

View File

@@ -22,12 +22,12 @@ func TestClean(t *testing.T) {
main.Commands[model.NEW].RunWith(c)
c.Index = model.TEST
main.Commands[model.TEST].RunWith(c)
a.True(utils.Exists(filepath.Join(gopath, "src", "clean-test", "app", "tmp", "main.go")),
"Missing main from path "+filepath.Join(gopath, "src", "clean-test", "app", "tmp", "main.go"))
a.True(utils.Exists(filepath.Join(gopath, "clean-test", "app", "tmp", "main.go")),
"Missing main from path "+filepath.Join(gopath, "clean-test", "app", "tmp", "main.go"))
c.Clean.ImportPath = c.ImportPath
a.Nil(main.Commands[model.CLEAN].RunWith(c), "Failed to run clean-test")
a.False(utils.Exists(filepath.Join(gopath, "src", "clean-test", "app", "tmp", "main.go")),
"Did not remove main from path "+filepath.Join(gopath, "src", "clean-test", "app", "tmp", "main.go"))
a.False(utils.Exists(filepath.Join(gopath, "clean-test", "app", "tmp", "main.go")),
"Did not remove main from path "+filepath.Join(gopath, "clean-test", "app", "tmp", "main.go"))
})
if !t.Failed() {
if err := os.RemoveAll(gopath); err != nil {