[BACK]Return to list.t CVS log [TXT][DIR] Up to [local] / todotxt / Text-Todo / t

Diff for /todotxt/Text-Todo/t/list.t between version 1.4 and 1.13

version 1.4, 2010/01/09 06:54:15 version 1.13, 2010/01/18 02:46:48
Line 8 
Line 8 
 #       AUTHOR:  Andrew Fresh (AAF), andrew@cpan.org  #       AUTHOR:  Andrew Fresh (AAF), andrew@cpan.org
 #      COMPANY:  Red River Communications  #      COMPANY:  Red River Communications
 #      CREATED:  01/07/10 19:11  #      CREATED:  01/07/10 19:11
 #     REVISION:  $RedRiver: list.t,v 1.3 2010/01/09 06:26:43 andrew Exp $  #     REVISION:  $AFresh1: list.t,v 1.11 2010/01/15 19:50:15 andrew Exp $
 #===============================================================================  #===============================================================================
   
 use strict;  use strict;
 use warnings;  use warnings;
   
 use Test::More;    #tests => 2;  use Test::More tests => 53;
   
 use File::Temp qw/ tempdir /;  use File::Temp qw/ tempdir /;
 use Data::Dumper;  
   
 my $class = 'Text::Todo';  my $class;
   BEGIN {
           $class = 'Text::Todo';
           use_ok( $class, "use $class" )
   }
   
 BEGIN: { use_ok( $class, "use $class" ) }  
   
 diag("Testing entry $class $Text::Todo::VERSION");  diag("Testing entry $class $Text::Todo::VERSION");
   
 my $orig = new_ok( $class, ['t/todo.list.txt'] );  my $orig = new_ok( $class, ['t/todo.list.txt'] );
Line 64 
Line 65 
 $orig = undef;  $orig = undef;
   
 my @pri_list;  my @pri_list;
 ok( @pri_list = $copy->listpri, 'list priority item' );  ok( @pri_list = $copy->listpri('A'), 'list priority item' );
 is( scalar @pri_list, 1, 'only 1 item in the priority list' );  is( scalar @pri_list, 1, 'only 1 item in the priority list' );
 is( $pri_list[0]->text, '(A) entry 1 @one +uno', 'priority item is correct' );  is( $pri_list[0]->text, '(A) entry 1 @one +uno', 'priority item is correct' );
   
Line 96 
Line 97 
     }      }
 }  }
   
 @projects;  
 ok( @projects = $copy->listproj, 'listproj for current list' );  ok( @projects = $copy->listproj, 'listproj for current list' );
 is_deeply( \@projects, [ 'dos', 'uno' ], 'got the projects we expected' );  is_deeply( \@projects, [ 'dos', 'uno' ], 'got the projects we expected' );
   
   my @contexts;
   ok( @contexts = $copy->listcon, 'listcon for current list' );
   is_deeply( \@contexts, [ 'one', 'two' ], 'got the contexts we expected' );
   
 my $entry_to_archive;  my $entry_to_archive;
 ok( $entry_to_archive = $copy->list->[1], 'read entry_to_archive' );  ok( $entry_to_archive = $copy->list->[3], 'read entry_to_archive' );
 is( $entry_to_archive->text,  is( $entry_to_archive->text,
     'x completed entry 3',      'x completed entry 4',
     'make sure we got the right entry'      'make sure we got the right entry'
 );  );
   
Line 128 
Line 132 
 is( $done[-2]->text, $entry_to_archive->text,  is( $done[-2]->text, $entry_to_archive->text,
     'make sure it moved to the archive' );      'make sure it moved to the archive' );
   
 done_testing();  #done_testing();

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.13

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>