use strict; use warnings; use Test::More tests => 3; use Test::Expect; expect_run( command => "java -cp '.' src/TestRoster", prompt => " >: ", quit => "0\n", ); expect_send( '97', 'Ask for help'); expect_like( qr/-Help about the menu items.+Terminate.+/sm, '... shows help text'); ...