added test for terminal command thread: args bound checking
This commit is contained in:
parent
c9acc86601
commit
8a05893244
@ -51,3 +51,19 @@ func TestCommandReplayWithoutPreviousCommand(t *testing.T) {
|
|||||||
t.Error("Null command not returned", err)
|
t.Error("Null command not returned", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestCommandThread(t *testing.T) {
|
||||||
|
var (
|
||||||
|
cmds = DebugCommands(nil)
|
||||||
|
cmd = cmds.Find("thread")
|
||||||
|
)
|
||||||
|
|
||||||
|
err := cmd(nil)
|
||||||
|
if err == nil {
|
||||||
|
t.Fatal("thread terminal command did not default")
|
||||||
|
}
|
||||||
|
|
||||||
|
if err.Error() != "you must specify a thread" {
|
||||||
|
t.Fatal("wrong command output: ", err.Error())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user