Update testing code, fix #33.
Merge pull request #37 from zpbx/fix-cmd-testing

Update testing code, fix #33.