Skip to content

Commit

Permalink
feat(mod): update core
Browse files Browse the repository at this point in the history
  • Loading branch information
Just-maple committed Oct 27, 2023
1 parent 96afa44 commit 89480c2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
14 changes: 0 additions & 14 deletions helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,11 @@ package main

import (
"os"
"runtime"
"testing"

zcore "github.com/go-zing/gozz-core"
)

func TestGetGoEnv(t *testing.T) {
env, err := getGoenv("./")
if err != nil {
t.Fatal(err)
}
if env["GOARCH"] != runtime.GOARCH {
t.Fatalf("get value unexpected: %v != %v ", env["GOARCH"], runtime.GOARCH)
}
if env["GOOS"] != runtime.GOOS {
t.Fatalf("get value unexpected: %v != %v ", env["GOOS"], runtime.GOOS)
}
}

func TestGetCoreVersion(t *testing.T) {
version := getCoreVersion()
v, err := zcore.ExecCommand("go list -f '{{ .Module.Version }}' "+coreDepPath, "")
Expand Down
17 changes: 17 additions & 0 deletions intsall_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build !windows
// +build !windows

/*
* Copyright (c) 2023 Maple Wu <justmaplewu@gmail.com>
* National Electronics and Computer Technology Center, Thailand
Expand All @@ -19,9 +22,23 @@ package main

import (
"os"
"runtime"
"testing"
)

func TestGetGoEnv(t *testing.T) {
env, err := getGoenv("./")
if err != nil {
t.Fatal(err)
}
if env["GOARCH"] != runtime.GOARCH {
t.Fatalf("get value unexpected: %v != %v ", env["GOARCH"], runtime.GOARCH)
}
if env["GOOS"] != runtime.GOOS {
t.Fatalf("get value unexpected: %v != %v ", env["GOOS"], runtime.GOOS)
}
}

func TestInstall(t *testing.T) {
defer os.Remove("tmp.so")
installBuildOutput = "tmp.so"
Expand Down

0 comments on commit 89480c2

Please sign in to comment.