[Pdx-pm] Scripting/testing ncurses interface with perl-expect

Austin Schutz tex at off.org
Mon Nov 14 11:51:17 PST 2005

On Mon, Nov 14, 2005 at 10:55:45AM -0800, Ben Prew wrote:
> I'm working on a system that has an ncurses interface, and I'm wondering if
> I can test it with perl-expect, or possibly something else?
> I looked at the tcl expect docs, and it said that I may be able to do some
> testing with tcl, but I was wondering if perl had this same support?
	Yes, you can. But there is no inherent curses login in expect
(or Expect.pm), so you will have to look for the specific curses control
codes in the output, as opposed to being able to look for more abstract
things like 'reverse video' or the like.
	Unless there has been significant development on the Tcl tool, the
level of support in this regard should be the same.

> Has anyone tried similar testing with a TUI before?

	I'm not sure what 'TUI' means, but I have used expect to capture
data from network devices which only supported curses. It's not that hard,
just a matter of turning on exp_internal and seeing what the UI is spitting
into the stream at you at any given point.


More information about the Pdx-pm-list mailing list