add test for command undo in parser

-add test for command undo in parser