=================================================================== RCS file: /cvs/todotxt/Text-Todo/t/entry.t,v retrieving revision 1.12 retrieving revision 1.14 diff -u -r1.12 -r1.14 --- todotxt/Text-Todo/t/entry.t 2010/01/15 19:44:32 1.12 +++ todotxt/Text-Todo/t/entry.t 2010/02/13 23:06:34 1.14 @@ -7,23 +7,26 @@ # AUTHOR: Andrew Fresh (AAF), andrew@cpan.org # COMPANY: Red River Communications # CREATED: 07/10/09 11:32:39 -# REVISION: $AFresh1: entry.t,v 1.11 2010/01/11 19:52:06 andrew Exp $ +# REVISION: $AFresh1: entry.t,v 1.13 2010/01/15 19:50:15 andrew Exp $ #=============================================================================== use strict; use warnings; -use Test::More tests => 40; +use Test::More tests => 41; -my $class = 'Text::Todo::Entry'; +my $class; +BEGIN { + $class = 'Text::Todo::Entry'; + use_ok( $class, "use $class" ) +} -BEGIN { use_ok( $class, "use $class" ) } - diag("Testing entry $class $Text::Todo::Entry::VERSION"); my %sample = ( text => '(B) @home @work send email to andrew@cpan.org + +say_thanks', priority => 'B', + known_tags => { context => '@', project => '+' }, contexts => [ 'home', 'work' ], projects => [ '', 'say_thanks' ], prepend => 'before', @@ -33,6 +36,7 @@ ); my $e = new_ok($class); +is_deeply( $e->known_tags, $sample{known_tags}, 'check known_tags' ); ok( $e->replace( $sample{text} ), 'Update entry' ); is( $e->text, $sample{text}, 'Make sure entry matches' );