提交 1bfae45b 编写于 作者: V Vorn Mom 提交者: Derek Parker

terminal/command: Fixed 'test' command on Windows

This change addresses a Windows-specifc issue with the 'test' command. On
Windows, 'go test' generate executables with a '.exe' filename extention,
but the current implementation attaches to a filename without the
extention.
上级 91743d94
......@@ -256,6 +256,10 @@ starts and attaches to it, and enable you to immediately begin debugging your pr
return 1
}
debugname := "./" + base + ".test"
// On Windows, "go test" generates an executable with the ".exe" extension
if runtime.GOOS == "windows" {
debugname += ".exe"
}
defer os.Remove(debugname)
processArgs := append([]string{debugname}, args...)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册