Annotation of todotxt/Text-Todo/t/special_tags.t, Revision 1.5
1.1 andrew 1: #===============================================================================
2: #
3: # FILE: special_tags.t
4: #
5: # DESCRIPTION: Test special tags
6: #
7: # AUTHOR: Andrew Fresh (AAF), andrew@cpan.org
8: # COMPANY: Red River Communications
9: # CREATED: 01/09//10 17:43
1.5 ! andrew 10: # REVISION: $AFresh1: special_tags.t,v 1.4 2010/01/15 19:44:32 andrew Exp $
1.1 andrew 11: #===============================================================================
12:
13: use strict;
14: use warnings;
15:
16: use Test::More tests => 7;
17:
1.5 ! andrew 18: my $class;
! 19: BEGIN {
! 20: $class = 'Text::Todo::Entry';
! 21: use_ok( $class, "use $class" )
! 22: }
1.1 andrew 23:
24: diag("Testing special tags in $class $Text::Todo::Entry::VERSION");
25:
26: my %sample = (
27: text => '(B) @home @work send email to andrew@cpan.org DUE:2011-01-01 +say_thanks',
28:
29: priority => 'B',
30: contexts => [ 'home', 'work' ],
31: projects => ['say_thanks'],
32: due_dates => ['2011-01-01'],
33: );
34:
35: my $e = new_ok($class, [ {text => $sample{text}, tags => { due_date => 'DUE:' }} ]);
36:
37: is( $e->text, $sample{text}, 'Make sure entry matches' );
38: is( $e->priority, $sample{priority}, 'check priority' );
39: is_deeply( [ $e->contexts ], $sample{contexts}, 'check contexts' );
40: is_deeply( [ $e->projects ], $sample{projects}, 'check projects' );
41:
42: is_deeply( [ $e->due_dates ], $sample{due_dates}, 'check due_dates');
43:
1.2 andrew 44: #done_testing();
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>