=================================================================== RCS file: /cvs/todotxt/Text-Todo/t/special_tags.t,v retrieving revision 1.2 retrieving revision 1.6 diff -u -r1.2 -r1.6 --- todotxt/Text-Todo/t/special_tags.t 2010/01/10 19:29:17 1.2 +++ todotxt/Text-Todo/t/special_tags.t 2010/02/13 23:06:34 1.6 @@ -7,23 +7,31 @@ # AUTHOR: Andrew Fresh (AAF), andrew@cpan.org # COMPANY: Red River Communications # CREATED: 01/09//10 17:43 -# REVISION: $RedRiver: special_tags.t,v 1.1 2010/01/10 01:03:02 andrew Exp $ +# REVISION: $AFresh1: special_tags.t,v 1.5 2010/01/15 19:50:15 andrew Exp $ #=============================================================================== use strict; use warnings; -use Test::More tests => 7; +use Test::More tests => 8; -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 special tags in $class $Text::Todo::Entry::VERSION"); my %sample = ( text => '(B) @home @work send email to andrew@cpan.org DUE:2011-01-01 +say_thanks', + known_tags => { + context => '@', + project => '+', + due_date => 'DUE:', + }, + priority => 'B', contexts => [ 'home', 'work' ], projects => ['say_thanks'], @@ -31,6 +39,8 @@ ); my $e = new_ok($class, [ {text => $sample{text}, tags => { due_date => 'DUE:' }} ]); + +is_deeply( $e->known_tags, $sample{known_tags}, 'check known_tags' ); is( $e->text, $sample{text}, 'Make sure entry matches' ); is( $e->priority, $sample{priority}, 'check priority' );