test if a command supports undo or not with the return value of Do().