consider .exe is added to executable on Windows

This commit is contained in:
rhysd 2017-12-30 13:41:34 +09:00
parent 75e095f048
commit cf74f35eed

View file

@ -5,6 +5,7 @@ import (
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
"testing"
)
@ -16,7 +17,11 @@ func setupTestBinary() {
}
func teardownTestBinary() {
if err := os.Remove("github-release-test"); err != nil {
bin := "github-release-test"
if runtime.GOOS == "windows" {
bin = "github-release-test.exe"
}
if err := os.Remove(bin); err != nil {
panic(err)
}
}