mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-13 01:02:28 +08:00
fix: os.go/ExecCommand make error the last return value
This commit is contained in:
@@ -23,10 +23,12 @@ func TestOsEnvOperation(t *testing.T) {
|
||||
func TestExecCommand(t *testing.T) {
|
||||
assert := internal.NewAssert(t, "TestExecCommand")
|
||||
|
||||
err, out, errout := ExecCommand("ls")
|
||||
out, errout, err := ExecCommand("ls")
|
||||
t.Log("std out: ", out)
|
||||
t.Log("std err: ", errout)
|
||||
assert.IsNil(err)
|
||||
|
||||
err, out, errout = ExecCommand("abc")
|
||||
out, errout, err = ExecCommand("abc")
|
||||
t.Log("std out: ", out)
|
||||
t.Log("std err: ", errout)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user