You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
424 B
Go
24 lines
424 B
Go
package nsys_test
|
|
|
|
import (
|
|
"git.noahlan.cn/noahlan/ntool/nsys"
|
|
"git.noahlan.cn/noahlan/ntool/ntest/assert"
|
|
"os"
|
|
"runtime"
|
|
"testing"
|
|
)
|
|
|
|
func TestBasic_usage(t *testing.T) {
|
|
assert.NotEmpty(t, nsys.BinDir())
|
|
assert.NotEmpty(t, nsys.BinFile())
|
|
}
|
|
|
|
func TestProcessExists(t *testing.T) {
|
|
if runtime.GOOS != "windows" {
|
|
pid := os.Getpid()
|
|
assert.True(t, nsys.ProcessExists(pid))
|
|
} else {
|
|
t.Skip("on Windows")
|
|
}
|
|
}
|