Update command line client to allow specifying command number

This commit is contained in:
Marc Di Luzio 2020-07-26 17:31:09 +01:00
parent 1514603517
commit c0d4a809c9
2 changed files with 33 additions and 14 deletions

View file

@ -54,8 +54,12 @@ func Test_InnerMain(t *testing.T) {
assert.NoError(t, InnerMain("command", "stash"))
assert.NoError(t, InnerMain("command", "repair"))
assert.NoError(t, InnerMain("command", "broadcast", "abc"))
assert.NoError(t, InnerMain("command", "10", "wait"))
assert.NoError(t, InnerMain("command", "1", "wait", "turn", "NW", "toggle", "broadcast", "zyx"))
// Give it malformed commands
assert.Error(t, InnerMain("command", "unknown"))
assert.Error(t, InnerMain("command", "broadcast"))
assert.Error(t, InnerMain("command", "0", "wait"))
assert.Error(t, InnerMain("command", "1"))
}