I\'m writing a command-line interface in Python. It uses the readline module to provide command history and completion.
While everything works fine in interactive mode,
You can try using Sikuli to test the end-user interaction with your application.
However, this is a complete overkill, requires a lot of extra dependencies, will work slowly, and will fail if the terminal font/colors change. But, still, you will be able to test actual user interaction.
The documentation homepage links to a slideshow and a FAQ question about writing tests using Sikuli.