Bug Fixes, Unit Tests
- Fixed bug where "foo:bar" was not recognized as an attribute, and generated an error rather than demoting is to part of the description. - Fixed bug where en-passant deltas were applied only to the first task in a sequence. - Fixed various unit test.
This commit is contained in:
@@ -210,7 +210,7 @@ int main (int argc, char** argv)
|
||||
n = Nibbler ("name:");
|
||||
good = true;
|
||||
try {a7.parse (n);} catch (...) {good = false;}
|
||||
t.notok (good, "Att::parse (name:)");
|
||||
t.ok (good, "Att::parse (name:)");
|
||||
|
||||
n = Nibbler ("name:\"value");
|
||||
good = true;
|
||||
|
||||
@@ -41,13 +41,13 @@ if (open my $fh, '>', 'basic.rc')
|
||||
# Test the usage command.
|
||||
my $output = qx{../task rc:basic.rc};
|
||||
like ($output, qr/Usage: task/, 'usage');
|
||||
like ($output, qr/http:\/\/www\.beckingham\.net\/task\.html/, 'usage - url');
|
||||
like ($output, qr/http:\/\/taskwarrior\.org/, 'usage - url');
|
||||
|
||||
# Test the version command.
|
||||
$output = qx{../task rc:basic.rc version};
|
||||
like ($output, qr/task \d+\.\d+\.\d+/, 'version - task version number');
|
||||
like ($output, qr/ABSOLUTELY NO WARRANTY/, 'version - warranty');
|
||||
like ($output, qr/http:\/\/www\.beckingham\.net\/task\.html/, 'version - url');
|
||||
like ($output, qr/http:\/\/taskwarrior\.org/, 'version - url');
|
||||
|
||||
# Cleanup.
|
||||
unlink 'basic.rc';
|
||||
|
||||
@@ -38,3 +38,16 @@
|
||||
ok 3 - Removed completed.data
|
||||
ok 4 - Removed bench.rc
|
||||
|
||||
6/18/2009
|
||||
1.8.0:
|
||||
1..4
|
||||
ok 1 - Created bench.rc
|
||||
# start=1245372501
|
||||
# 1000 tasks added in 4 seconds
|
||||
# 600 tasks altered in 45 seconds
|
||||
# stop=1245372747
|
||||
# total=246
|
||||
ok 2 - Removed pending.data
|
||||
ok 3 - Removed completed.data
|
||||
ok 4 - Removed bench.rc
|
||||
|
||||
|
||||
@@ -57,14 +57,14 @@ if (open my $fh, '>', 'annual.rc')
|
||||
|
||||
qx{../task rc:annual.rc add foo due:1/1/2000 recur:annual until:1/1/2009};
|
||||
my $output = qx{../task rc:annual.rc list};
|
||||
like ($output, qr/2\s+1\/1\/2000\s+- foo/, 'synthetic 1 no creep');
|
||||
like ($output, qr/3\s+1\/1\/2001\s+- foo/, 'synthetic 2 no creep');
|
||||
like ($output, qr/4\s+1\/1\/2002\s+- foo/, 'synthetic 3 no creep');
|
||||
like ($output, qr/5\s+1\/1\/2003\s+- foo/, 'synthetic 4 no creep');
|
||||
like ($output, qr/6\s+1\/1\/2004\s+- foo/, 'synthetic 5 no creep');
|
||||
like ($output, qr/7\s+1\/1\/2005\s+- foo/, 'synthetic 6 no creep');
|
||||
like ($output, qr/8\s+1\/1\/2006\s+- foo/, 'synthetic 7 no creep');
|
||||
like ($output, qr/9\s+1\/1\/2007\s+- foo/, 'synthetic 8 no creep');
|
||||
like ($output, qr/2\s+1\/1\/2000\s+- foo/, 'synthetic 1 no creep');
|
||||
like ($output, qr/3\s+1\/1\/2001\s+- foo/, 'synthetic 2 no creep');
|
||||
like ($output, qr/4\s+1\/1\/2002\s+- foo/, 'synthetic 3 no creep');
|
||||
like ($output, qr/5\s+1\/1\/2003\s+- foo/, 'synthetic 4 no creep');
|
||||
like ($output, qr/6\s+1\/1\/2004\s+- foo/, 'synthetic 5 no creep');
|
||||
like ($output, qr/7\s+1\/1\/2005\s+- foo/, 'synthetic 6 no creep');
|
||||
like ($output, qr/8\s+1\/1\/2006\s+- foo/, 'synthetic 7 no creep');
|
||||
like ($output, qr/9\s+1\/1\/2007\s+- foo/, 'synthetic 8 no creep');
|
||||
like ($output, qr/10\s+1\/1\/2008\s+- foo/, 'synthetic 9 no creep');
|
||||
like ($output, qr/11\s+1\/1\/2009\s+- foo/, 'synthetic 10 no creep');
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ use Test::More tests => 16;
|
||||
if (open my $fh, '>', 'default.rc')
|
||||
{
|
||||
print $fh "data.location=.\n",
|
||||
"default.command=list\n",
|
||||
"default.command=rc:default.rc list\n",
|
||||
"default.project=PROJECT\n",
|
||||
"default.priority=M\n";
|
||||
close $fh;
|
||||
|
||||
@@ -46,21 +46,21 @@ like ($output, qr/Status\s+Pending\n/, 'Pending');
|
||||
|
||||
$output = qx{../task rc:undelete.rc delete 1; ../task rc:undelete.rc info 1};
|
||||
like ($output, qr/Status\s+Deleted\n/, 'Deleted');
|
||||
ok (! -r 'completed.data', 'completed.data not created');
|
||||
ok (-r 'completed.data', 'completed.data created');
|
||||
|
||||
$output = qx{../task rc:undelete.rc undelete 1; ../task rc:undelete.rc info 1};
|
||||
like ($output, qr/Status\s+Pending\n/, 'Pending');
|
||||
ok (! -r 'completed.data', 'completed.data not created');
|
||||
ok (-r 'completed.data', 'completed.data created');
|
||||
|
||||
$output = qx{../task rc:undelete.rc delete 1; ../task rc:undelete.rc list};
|
||||
like ($output, qr/^No matches/, 'No matches');
|
||||
like ($output, qr/No matches./, 'No matches');
|
||||
ok (-r 'completed.data', 'completed.data created');
|
||||
|
||||
$output = qx{../task rc:undelete.rc undelete 1};
|
||||
like ($output, qr/Task 1 not found/, 'Task 1 not found');
|
||||
|
||||
$output = qx{../task rc:undelete.rc info 1};
|
||||
like ($output, qr/No matches./, 'no matches');
|
||||
like ($output, qr/Task 1 not found/, 'No matches');
|
||||
|
||||
# Cleanup.
|
||||
ok (-r 'pending.data', 'Need to remove pending.data');
|
||||
|
||||
Reference in New Issue
Block a user