AnyEvent-Tickit

 view release on metacpan or  search on metacpan

t/02input.t  view on Meta::CPAN

   do { AnyEvent->_poll } until ( @mouse_events );

   # Tickit::Term reports position 0-based
   is_deeply( \@mouse_events,
              [ { type => "press", button => 1, line => 10, col => 20, mod => 0 } ],
              'on_mouse press(1) @20,10' );
}

{
   my $got_Ctrl_A;
   $tickit->bind_key( "C-a" => sub { $got_Ctrl_A++ } );

   $my_wr->syswrite( "\cA" );

   do { AnyEvent->_poll } until ( $got_Ctrl_A );

   is( $got_Ctrl_A, 1, 'bind Ctrl-A' );
}

done_testing;



( run in 0.621 second using v1.01-cache-2.11-cpan-2398b32b56e )