version 1.3, 2010/01/06 19:54:56 |
version 1.4, 2010/01/08 23:06:09 |
|
|
# AUTHOR: Andrew Fresh (AAF), andrew@cpan.org |
# AUTHOR: Andrew Fresh (AAF), andrew@cpan.org |
# COMPANY: Red River Communications |
# COMPANY: Red River Communications |
# CREATED: 07/09/09 11:45:52 |
# CREATED: 07/09/09 11:45:52 |
# REVISION: $RedRiver: 50.read_todo.t,v 1.2 2009/07/13 17:50:37 andrew Exp $ |
# REVISION: $RedRiver: read_todo.t,v 1.3 2010/01/06 19:54:56 andrew Exp $ |
#=============================================================================== |
#=============================================================================== |
|
|
use strict; |
use strict; |
|
|
priority => 'B', |
priority => 'B', |
contexts => ['phone'], |
contexts => ['phone'], |
projects => ['GarageSale'], |
projects => ['GarageSale'], |
complete => undef, |
do => undef, |
}, |
}, |
{ text => |
{ text => |
'+GarageSale @home post signs around the neighborhood DUE:2006-08-01', |
'+GarageSale @home post signs around the neighborhood DUE:2006-08-01', |
priority => undef, |
priority => undef, |
contexts => ['home'], |
contexts => ['home'], |
projects => ['GarageSale'], |
projects => ['GarageSale'], |
complete => undef, |
do => undef, |
}, |
}, |
{ text => 'X eat meatballs @home', |
{ text => 'X eat meatballs @home', |
priority => undef, |
priority => undef, |
contexts => ['home'], |
contexts => ['home'], |
projects => [], |
projects => [], |
complete => 'X', |
do => 'X', |
}, |
}, |
{ text => '(A) @phone thank Mom for the meatballs WAIT', |
{ text => '(A) @phone thank Mom for the meatballs WAIT', |
priority => 'A', |
priority => 'A', |
contexts => ['phone'], |
contexts => ['phone'], |
projects => [], |
projects => [], |
complete => undef, |
do => undef, |
}, |
}, |
{ text => '@shopping Eskimo pies', |
{ text => '@shopping Eskimo pies', |
priority => undef, |
priority => undef, |
contexts => ['shopping'], |
contexts => ['shopping'], |
projects => [], |
projects => [], |
complete => undef, |
do => undef, |
}, |
}, |
{ text => 'email andrew@cpan.org for help +report_bug @wherever', |
{ text => 'email andrew@cpan.org for help +report_bug @wherever', |
priority => undef, |
priority => undef, |
contexts => ['wherever'], |
contexts => ['wherever'], |
projects => ['report_bug'], |
projects => ['report_bug'], |
complete => undef, |
do => undef, |
}, |
}, |
); |
); |
|
|
|
|
priority => undef, |
priority => undef, |
contexts => ['continually'], |
contexts => ['continually'], |
projects => ['test+everything'], |
projects => ['test+everything'], |
complete => undef, |
do => undef, |
); |
); |
|
|
BEGIN: { use_ok( 'Text::Todo', 'use Text::Todo' ) } |
BEGIN: { use_ok( 'Text::Todo', 'use Text::Todo' ) } |
|
|
|
|
is( $read->text, $sample->{text}, "check text [$id]" ); |
is( $read->text, $sample->{text}, "check text [$id]" ); |
is( $read->priority, $sample->{priority}, "check priority [$id]" ); |
is( $read->priority, $sample->{priority}, "check priority [$id]" ); |
is( $read->completed, $sample->{complete}, "check completion [$id]" ); |
is( $read->done, $sample->{do}, "check completion [$id]" ); |
is_deeply( |
is_deeply( |
[ $read->contexts ], |
[ $read->contexts ], |
$sample->{contexts}, |
$sample->{contexts}, |