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>
pull/862/head
Alex Brainman 4 years ago committed by Brad Fitzpatrick
parent 3d34128171
commit 311899709b

@ -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

Loading…
Cancel
Save