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:
@@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user