mirror of
https://github.com/duke-git/lancet.git
synced 2026-11-16 05:12:11 +08:00
test: add TestExecCommandWithOption
This commit is contained in:
1 parent
4311b9ac66
commit
424c291813
3 files changed
+17
-8
No files matched your search
@@ -68,6 +68,16 @@ func TestExecCommand(t *testing.T) {
|
||||
assert.IsNotNil(err)
|
||||
}
|
||||
|
||||
func TestExecCommandWithOption(t *testing.T) {
|
||||
assert := internal.NewAssert(t, "TestExecCommand")
|
||||
|
||||
stdout, stderr, err := ExecCommand("ls", WithForeground())
|
||||
t.Log("std out: ", stdout)
|
||||
t.Log("std err: ", stderr)
|
||||
assert.Equal("", stderr)
|
||||
assert.IsNil(err)
|
||||
}
|
||||
|
||||
func TestGetOsBits(t *testing.T) {
|
||||
osBits := GetOsBits()
|
||||
switch osBits {
|
||||
|
||||
Reference in new issue
Block a user