This is a simple implementation of expect to help building unitary testing of interactive program.
expect
See the Expect manual for more information: https://www.nist.gov/services-resources/software/expect