add unit tests for parse_cmd