version: skip TestMkversion on windows

TestMkversion requires UNIX shell to run mkversion.sh. No such shell
is present on Windows. Just skip the test.

Updates #50

Signed-off-by: Alex Brainman <alex.brainman@gmail.com>
This commit is contained in:
Alex Brainman 2020-10-17 18:00:38 +11:00 committed by Brad Fitzpatrick
parent 3d34128171
commit 311899709b

View File

@ -7,6 +7,7 @@ package version
import (
"fmt"
"os/exec"
"runtime"
"strings"
"testing"
)
@ -26,6 +27,9 @@ func mkversion(t *testing.T, mode, in string) (string, bool) {
}
func TestMkversion(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("skip test on Windows, because there is no shell to execute mkversion.sh.")
}
tests := []struct {
in string
ok bool