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

Annotation of todotxt/Text-Todo/t/special_tags.t, Revision 1.1

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
        !            10: #     REVISION:  $RedRiver$
        !            11: #===============================================================================
        !            12:
        !            13: use strict;
        !            14: use warnings;
        !            15:
        !            16: use Test::More tests => 7;
        !            17:
        !            18: my $class = 'Text::Todo::Entry';
        !            19:
        !            20: BEGIN: { use_ok( $class, "use $class" ) }
        !            21:
        !            22: diag("Testing special tags in $class $Text::Todo::Entry::VERSION");
        !            23:
        !            24: my %sample = (
        !            25:     text     => '(B) @home @work send email to andrew@cpan.org DUE:2011-01-01 +say_thanks',
        !            26:
        !            27:     priority  => 'B',
        !            28:     contexts  => [ 'home', 'work' ],
        !            29:     projects  => ['say_thanks'],
        !            30:     due_dates => ['2011-01-01'],
        !            31: );
        !            32:
        !            33: my $e = new_ok($class, [ {text => $sample{text}, tags => { due_date => 'DUE:' }} ]);
        !            34:
        !            35: is( $e->text,     $sample{text},     'Make sure entry matches' );
        !            36: is( $e->priority, $sample{priority}, 'check priority' );
        !            37: is_deeply( [ $e->contexts ], $sample{contexts}, 'check contexts' );
        !            38: is_deeply( [ $e->projects ], $sample{projects}, 'check projects' );
        !            39:
        !            40: is_deeply( [ $e->due_dates ], $sample{due_dates}, 'check due_dates');
        !            41:
        !            42: done_testing();

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