Applications with a terminal interface can be tested by setting `TERM=xterm`, giving them a virtual TTY by using DebianMan:pipetty (from [[DebianPackage:colorized-logs]]), sending input to them using printf, piping the output through DebianMan:ansi2txt (from [[DebianPackage:colorized-logs]]), converting output CR characters to LF characters and inspecting the files or other output for correct patterns. An example of this approach is in [[https://sources.debian.org/src/hexedit/latest/debian/tests/|src:hexedit]].