Added test for Ctrl-D in cmd mode.