1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-23 13:52:26 +08:00

fix: TestExecCommand failed in linux/macos

This commit is contained in:
dudaodong
2022-12-10 19:12:19 +08:00
parent 00407e5182
commit 251f899f18

View File

@@ -57,15 +57,14 @@ func TestExecCommand(t *testing.T) {
stdout, stderr, err = ExecCommand("dir") stdout, stderr, err = ExecCommand("dir")
t.Log("std out: ", stdout) t.Log("std out: ", stdout)
t.Log("std err: ", stderr) t.Log("std err: ", stderr)
assert.IsNil(err) if IsWindows() {
assert.IsNil(err)
}
// error command // error command
stdout, stderr, err = ExecCommand("abc") stdout, stderr, err = ExecCommand("abc")
t.Log("std out: ", stdout) t.Log("std out: ", stdout)
t.Log("std err: ", stderr) t.Log("std err: ", stderr)
// if err != nil {
// t.Log(err.Error())
// }
assert.IsNotNil(err) assert.IsNotNil(err)
} }