This patch adds a new test and fixes extra new-line before exit
This test is failing on Linux. I am trying to understand how this test is supposed to work. Please add some more comments and then I can debug why it is failing on Linux.
This is not being used.
Add some comments to describe what these functions are meant to do.
What it means to be in command state?
You can commit this line separately. It does not seem to related to this patch.