better testing for commands

Signed-off-by: Tomas Neme <lacrymology@gmail.com>