/[iselect]/t/10-iselect.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /t/10-iselect.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 13 by dpavlin, Thu Oct 25 16:08:43 2007 UTC revision 14 by dpavlin, Thu Oct 25 17:24:33 2007 UTC
# Line 4  use warnings; Line 4  use warnings;
4    
5  my $debug = shift @ARGV;  my $debug = shift @ARGV;
6    
7  use Test::More tests => 3;  use Test::More tests => 6;
8  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
9  use blib;  use blib;
10    
# Line 12  BEGIN { Line 12  BEGIN {
12          use_ok('Term::ISelect');          use_ok('Term::ISelect');
13  }  }
14    
15  ok( my $iselect = Term::ISelect->new({  my $lines = [
         lines => [  
16                  'first line',                  'first line',
17                  '{s}second selectable line',                  '{s}second selectable line',
18                  '',                  '',
19                  'last line',                  'last line',
20          ],  ];
21    
22    ok( my $iselect = Term::ISelect->new({
23            lines => $lines,
24          debug => $debug,          debug => $debug,
25  }), 'new' );  }), 'new' );
26  isa_ok( $iselect, 'Term::ISelect' );  isa_ok( $iselect, 'Term::ISelect' );
27    
28    diag "lines = ", dump( $iselect->lines ) if $debug;
29    
30    is_deeply( $iselect->lines, $lines, 'lines' );
31    
32    ok( $iselect->open_screen, 'open_screen' );
33    system 'stty sane';
34    
35    ok( my $l = $iselect->full_line( "foo bar" ), 'full_line' );
36    
37    diag "full_line '$l'" if $debug;
38    

Legend:
Removed from v.13  
changed lines
  Added in v.14

  ViewVC Help
Powered by ViewVC 1.1.26