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

Diff for /todotxt/Text-Todo/t/entry.t between version 1.3 and 1.4

version 1.3, 2009/07/13 18:50:37 version 1.4, 2009/07/13 19:05:50
Line 7 
Line 7 
 #       AUTHOR:  Andrew Fresh (AAF), andrew@cpan.org  #       AUTHOR:  Andrew Fresh (AAF), andrew@cpan.org
 #      COMPANY:  Red River Communications  #      COMPANY:  Red River Communications
 #      CREATED:  07/10/09 11:32:39  #      CREATED:  07/10/09 11:32:39
 #     REVISION:  $RedRiver: 20.entry.t,v 1.2 2009/07/11 15:58:13 andrew Exp $  #     REVISION:  $RedRiver: 20.entry.t,v 1.3 2009/07/13 17:50:37 andrew Exp $
 #===============================================================================  #===============================================================================
   
 use strict;  use strict;
 use warnings;  use warnings;
   
 use Test::More tests => 29;    # last test to print  use Test::More tests => 34;    # last test to print
   
 my $class = 'Text::Todo::Entry';  my $class = 'Text::Todo::Entry';
   
Line 23 
Line 23 
   
 my $e = new_ok($class);  my $e = new_ok($class);
   
 is( $e->text,     '',    "Make sure entry is blank" );  
 is( $e->priority, undef, "check priority is undef" );  
 is_deeply( [ $e->contexts ], [], "check contexts are empty" );  
 is_deeply( [ $e->projects ], [], "check projects are empty" );  
   
 my %sample = (  my %sample = (
     text => '(B) @home @work send email to andrew@cpan.org +say_thanks',      text => '(B) @home @work send email to andrew@cpan.org +say_thanks',
     priority    => 'B',      priority    => 'B',
Line 72 
Line 67 
 ok( $e->append( '@' . $sample{new_context} ), 'Add context' );  ok( $e->append( '@' . $sample{new_context} ), 'Add context' );
 is( $e->text, $sample{text}, "Make sure entry matches" );  is( $e->text, $sample{text}, "Make sure entry matches" );
 ok( $e->in_context( $sample{new_context} ), 'now in new context' );  ok( $e->in_context( $sample{new_context} ), 'now in new context' );
   
   ok( !$e->completed, 'not completed' );
   ok( $e->complete, 'mark as completed' );
   ok( $e->completed,  'now completed' );
   is( $e->text, 'x ' . $sample{text}, "Make sure entry matches" );
   
   ok( $e->change(   '' ), 'Blank entry' );
   is( $e->text,     '',    "Make sure entry is blank" );
   is( $e->priority, undef, "check priority is undef" );
   is_deeply( [ $e->contexts ], [], "check contexts are empty" );
   is_deeply( [ $e->projects ], [], "check projects are empty" );
   

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

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