mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Unit Tests
- Modified testing to accomodate new split between stdout/stderr.
This commit is contained in:
parent
75822eed47
commit
da575c4043
185 changed files with 1591 additions and 1591 deletions
|
@ -40,53 +40,53 @@ if (open my $fh, '>', 'abbrev.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test the priority attribute abbrevations.
|
# Test the priority attribute abbrevations.
|
||||||
qx{../src/task rc:abbrev.rc add priority:H with};
|
qx{../src/task rc:abbrev.rc add priority:H with 2>&1};
|
||||||
qx{../src/task rc:abbrev.rc add without};
|
qx{../src/task rc:abbrev.rc add without 2>&1};
|
||||||
|
|
||||||
my $output = qx{../src/task rc:abbrev.rc list priority:H};
|
my $output = qx{../src/task rc:abbrev.rc list priority:H 2>&1};
|
||||||
like ($output, qr/\bwith\b/, 'priority:H with');
|
like ($output, qr/\bwith\b/, 'priority:H with');
|
||||||
unlike ($output, qr/\bwithout\b/, 'priority:H without');
|
unlike ($output, qr/\bwithout\b/, 'priority:H without');
|
||||||
|
|
||||||
$output = qx{../src/task rc:abbrev.rc list priorit:H};
|
$output = qx{../src/task rc:abbrev.rc list priorit:H 2>&1};
|
||||||
like ($output, qr/\bwith\b/, 'priorit:H with');
|
like ($output, qr/\bwith\b/, 'priorit:H with');
|
||||||
unlike ($output, qr/\bwithout\b/, 'priorit:H without');
|
unlike ($output, qr/\bwithout\b/, 'priorit:H without');
|
||||||
|
|
||||||
$output = qx{../src/task rc:abbrev.rc list priori:H};
|
$output = qx{../src/task rc:abbrev.rc list priori:H 2>&1};
|
||||||
like ($output, qr/\bwith\b/, 'priori:H with');
|
like ($output, qr/\bwith\b/, 'priori:H with');
|
||||||
unlike ($output, qr/\bwithout\b/, 'priori:H without');
|
unlike ($output, qr/\bwithout\b/, 'priori:H without');
|
||||||
|
|
||||||
$output = qx{../src/task rc:abbrev.rc list prior:H};
|
$output = qx{../src/task rc:abbrev.rc list prior:H 2>&1};
|
||||||
like ($output, qr/\bwith\b/, 'prior:H with');
|
like ($output, qr/\bwith\b/, 'prior:H with');
|
||||||
unlike ($output, qr/\bwithout\b/, 'prior:H without');
|
unlike ($output, qr/\bwithout\b/, 'prior:H without');
|
||||||
|
|
||||||
$output = qx{../src/task rc:abbrev.rc list prio:H};
|
$output = qx{../src/task rc:abbrev.rc list prio:H 2>&1};
|
||||||
like ($output, qr/\bwith\b/, 'prio:H with');
|
like ($output, qr/\bwith\b/, 'prio:H with');
|
||||||
unlike ($output, qr/\bwithout\b/, 'prio:H without');
|
unlike ($output, qr/\bwithout\b/, 'prio:H without');
|
||||||
|
|
||||||
$output = qx{../src/task rc:abbrev.rc list pri:H};
|
$output = qx{../src/task rc:abbrev.rc list pri:H 2>&1};
|
||||||
like ($output, qr/\bwith\b/, 'pri:H with');
|
like ($output, qr/\bwith\b/, 'pri:H with');
|
||||||
unlike ($output, qr/\bwithout\b/, 'pri:H without');
|
unlike ($output, qr/\bwithout\b/, 'pri:H without');
|
||||||
|
|
||||||
# Test the version command abbreviations.
|
# Test the version command abbreviations.
|
||||||
$output = qx{../src/task rc:abbrev.rc version};
|
$output = qx{../src/task rc:abbrev.rc version 2>&1};
|
||||||
like ($output, qr/MIT\s+license/, 'version');
|
like ($output, qr/MIT\s+license/, 'version');
|
||||||
|
|
||||||
$output = qx{../src/task rc:abbrev.rc versio};
|
$output = qx{../src/task rc:abbrev.rc versio 2>&1};
|
||||||
like ($output, qr/MIT\s+license/, 'version');
|
like ($output, qr/MIT\s+license/, 'version');
|
||||||
|
|
||||||
$output = qx{../src/task rc:abbrev.rc versi};
|
$output = qx{../src/task rc:abbrev.rc versi 2>&1};
|
||||||
like ($output, qr/MIT\s+license/, 'version');
|
like ($output, qr/MIT\s+license/, 'version');
|
||||||
|
|
||||||
$output = qx{../src/task rc:abbrev.rc vers};
|
$output = qx{../src/task rc:abbrev.rc vers 2>&1};
|
||||||
like ($output, qr/MIT\s+license/, 'version');
|
like ($output, qr/MIT\s+license/, 'version');
|
||||||
|
|
||||||
$output = qx{../src/task rc:abbrev.rc ver};
|
$output = qx{../src/task rc:abbrev.rc ver 2>&1};
|
||||||
like ($output, qr/MIT\s+license/, 'version');
|
like ($output, qr/MIT\s+license/, 'version');
|
||||||
|
|
||||||
$output = qx{../src/task rc:abbrev.rc ve};
|
$output = qx{../src/task rc:abbrev.rc ve 2>&1};
|
||||||
like ($output, qr/MIT\s+license/, 'version');
|
like ($output, qr/MIT\s+license/, 'version');
|
||||||
|
|
||||||
$output = qx{../src/task rc:abbrev.rc v};
|
$output = qx{../src/task rc:abbrev.rc v 2>&1};
|
||||||
like ($output, qr/MIT\s+license/, 'version');
|
like ($output, qr/MIT\s+license/, 'version');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
10
test/add.t
10
test/add.t
|
@ -40,17 +40,17 @@ if (open my $fh, '>', 'add.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test the add command.
|
# Test the add command.
|
||||||
qx{../src/task rc:add.rc add This is a test};
|
qx{../src/task rc:add.rc add This is a test 2>&1};
|
||||||
my $output = qx{../src/task rc:add.rc info 1};
|
my $output = qx{../src/task rc:add.rc info 1 2>&1};
|
||||||
like ($output, qr/ID\s+1\n/, 'add ID');
|
like ($output, qr/ID\s+1\n/, 'add ID');
|
||||||
like ($output, qr/Description\s+This is a test\n/, 'add ID');
|
like ($output, qr/Description\s+This is a test\n/, 'add ID');
|
||||||
like ($output, qr/Status\s+Pending\n/, 'add Pending');
|
like ($output, qr/Status\s+Pending\n/, 'add Pending');
|
||||||
like ($output, qr/UUID\s+[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\n/, 'add UUID');
|
like ($output, qr/UUID\s+[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\n/, 'add UUID');
|
||||||
|
|
||||||
# Test the /// modifier.
|
# Test the /// modifier.
|
||||||
qx{../src/task rc:add.rc 1 modify /test/TEST/};
|
qx{../src/task rc:add.rc 1 modify /test/TEST/ 2>&1};
|
||||||
qx{../src/task rc:add.rc 1 modify "/is //"};
|
qx{../src/task rc:add.rc 1 modify "/is //" 2>&1};
|
||||||
$output = qx{../src/task rc:add.rc info 1};
|
$output = qx{../src/task rc:add.rc info 1 2>&1};
|
||||||
like ($output, qr/ID\s+1\n/, 'add ID');
|
like ($output, qr/ID\s+1\n/, 'add ID');
|
||||||
like ($output, qr/Status\s+Pending\n/, 'add Pending');
|
like ($output, qr/Status\s+Pending\n/, 'add Pending');
|
||||||
like ($output, qr/Description\s+This a TEST\n/, 'add Description');
|
like ($output, qr/Description\s+This a TEST\n/, 'add Description');
|
||||||
|
|
|
@ -41,15 +41,15 @@ if (open my $fh, '>', 'alias.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add a task with certain project, then access that task via aliases.
|
# Add a task with certain project, then access that task via aliases.
|
||||||
qx{../src/task rc:alias.rc add project:ALIAS foo};
|
qx{../src/task rc:alias.rc add project:ALIAS foo 2>&1};
|
||||||
|
|
||||||
my $output = qx{../src/task rc:alias.rc _projects};
|
my $output = qx{../src/task rc:alias.rc _projects 2>&1};
|
||||||
like ($output, qr/ALIAS/, 'task _projects -> ALIAS');
|
like ($output, qr/ALIAS/, 'task _projects -> ALIAS');
|
||||||
|
|
||||||
$output = qx{../src/task rc:alias.rc foo};
|
$output = qx{../src/task rc:alias.rc foo 2>&1};
|
||||||
like ($output, qr/ALIAS/, 'task foo -> _projects -> ALIAS');
|
like ($output, qr/ALIAS/, 'task foo -> _projects -> ALIAS');
|
||||||
|
|
||||||
$output = qx{../src/task rc:alias.rc bar};
|
$output = qx{../src/task rc:alias.rc bar 2>&1};
|
||||||
like ($output, qr/ALIAS/, 'task bar -> foo -> _projects -> ALIAS');
|
like ($output, qr/ALIAS/, 'task bar -> foo -> _projects -> ALIAS');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -46,18 +46,18 @@ if (open my $fh, '>', 'annotate.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add four tasks, annotate one three times, one twice, one just once and one none.
|
# Add four tasks, annotate one three times, one twice, one just once and one none.
|
||||||
qx{../src/task rc:annotate.rc add one};
|
qx{../src/task rc:annotate.rc add one 2>&1};
|
||||||
qx{../src/task rc:annotate.rc add two};
|
qx{../src/task rc:annotate.rc add two 2>&1};
|
||||||
qx{../src/task rc:annotate.rc add three};
|
qx{../src/task rc:annotate.rc add three 2>&1};
|
||||||
qx{../src/task rc:annotate.rc add four};
|
qx{../src/task rc:annotate.rc add four 2>&1};
|
||||||
qx{../src/task rc:annotate.rc 1 annotate foo1};
|
qx{../src/task rc:annotate.rc 1 annotate foo1 2>&1};
|
||||||
qx{../src/task rc:annotate.rc 1 annotate foo2};
|
qx{../src/task rc:annotate.rc 1 annotate foo2 2>&1};
|
||||||
qx{../src/task rc:annotate.rc 1 annotate foo3};
|
qx{../src/task rc:annotate.rc 1 annotate foo3 2>&1};
|
||||||
qx{../src/task rc:annotate.rc 2 annotate bar1};
|
qx{../src/task rc:annotate.rc 2 annotate bar1 2>&1};
|
||||||
qx{../src/task rc:annotate.rc 2 annotate bar2};
|
qx{../src/task rc:annotate.rc 2 annotate bar2 2>&1};
|
||||||
qx{../src/task rc:annotate.rc 3 annotate baz1};
|
qx{../src/task rc:annotate.rc 3 annotate baz1 2>&1};
|
||||||
|
|
||||||
my $output = qx{../src/task rc:annotate.rc rrr};
|
my $output = qx{../src/task rc:annotate.rc rrr 2>&1};
|
||||||
|
|
||||||
# ID Description
|
# ID Description
|
||||||
# -- -------------------------------
|
# -- -------------------------------
|
||||||
|
@ -100,7 +100,7 @@ if (open my $fh, '>', 'annotate2.rc')
|
||||||
ok (-r 'annotate2.rc', 'Created annotate2.rc');
|
ok (-r 'annotate2.rc', 'Created annotate2.rc');
|
||||||
}
|
}
|
||||||
|
|
||||||
$output = qx{../src/task rc:annotate2.rc rrr};
|
$output = qx{../src/task rc:annotate2.rc rrr 2>&1};
|
||||||
like ($output, qr/1 one/, 'task 1'); # 14
|
like ($output, qr/1 one/, 'task 1'); # 14
|
||||||
like ($output, qr/2 two/, 'task 2');
|
like ($output, qr/2 two/, 'task 2');
|
||||||
like ($output, qr/3 three/, 'task 3');
|
like ($output, qr/3 three/, 'task 3');
|
||||||
|
|
|
@ -40,13 +40,13 @@ if (open my $fh, '>', 'append.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add a task, then append more description.
|
# Add a task, then append more description.
|
||||||
qx{../src/task rc:append.rc add foo};
|
qx{../src/task rc:append.rc add foo 2>&1};
|
||||||
qx{../src/task rc:append.rc 1 append bar};
|
qx{../src/task rc:append.rc 1 append bar 2>&1};
|
||||||
my $output = qx{../src/task rc:append.rc info 1};
|
my $output = qx{../src/task rc:append.rc info 1 2>&1};
|
||||||
like ($output, qr/Description\s+foo\sbar\n/, 'append worked');
|
like ($output, qr/Description\s+foo\sbar\n/, 'append worked');
|
||||||
|
|
||||||
# Should cause an error when nothing is appended.
|
# Should cause an error when nothing is appended.
|
||||||
$output = qx{../src/task rc:append.rc 1 append};
|
$output = qx{../src/task rc:append.rc 1 append 2>&1};
|
||||||
unlike ($output, qr/Appended 0 tasks/, 'blank append failed');
|
unlike ($output, qr/Appended 0 tasks/, 'blank append failed');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -40,18 +40,18 @@ if (open my $fh, '>', 'args.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test id before command, and id after command.
|
# Test id before command, and id after command.
|
||||||
qx{../src/task rc:args.rc add one};
|
qx{../src/task rc:args.rc add one 2>&1};
|
||||||
qx{../src/task rc:args.rc add two};
|
qx{../src/task rc:args.rc add two 2>&1};
|
||||||
qx{../src/task rc:args.rc add three};
|
qx{../src/task rc:args.rc add three 2>&1};
|
||||||
my $output = qx{../src/task rc:args.rc list};
|
my $output = qx{../src/task rc:args.rc list 2>&1};
|
||||||
like ($output, qr/one/, 'task 1 added');
|
like ($output, qr/one/, 'task 1 added');
|
||||||
like ($output, qr/two/, 'task 2 added');
|
like ($output, qr/two/, 'task 2 added');
|
||||||
like ($output, qr/three/, 'task 3 added');
|
like ($output, qr/three/, 'task 3 added');
|
||||||
|
|
||||||
$output = qx{../src/task rc:args.rc 1 done};
|
$output = qx{../src/task rc:args.rc 1 done 2>&1};
|
||||||
like ($output, qr/^Completed 1 /ms, 'COMMAND after ID');
|
like ($output, qr/^Completed 1 /ms, 'COMMAND after ID');
|
||||||
|
|
||||||
$output = qx{../src/task rc:args.rc done 2};
|
$output = qx{../src/task rc:args.rc done 2 2>&1};
|
||||||
unlike ($output, qr/^Completed 2 /ms, 'ID after COMMAND');
|
unlike ($output, qr/^Completed 2 /ms, 'ID after COMMAND');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -40,30 +40,30 @@ if (open my $fh, '>', 'args.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test 'done' with en-passant changes.
|
# Test 'done' with en-passant changes.
|
||||||
qx{../src/task rc:args.rc add one};
|
qx{../src/task rc:args.rc add one 2>&1};
|
||||||
qx{../src/task rc:args.rc add two};
|
qx{../src/task rc:args.rc add two 2>&1};
|
||||||
qx{../src/task rc:args.rc add three};
|
qx{../src/task rc:args.rc add three 2>&1};
|
||||||
qx{../src/task rc:args.rc add four};
|
qx{../src/task rc:args.rc add four 2>&1};
|
||||||
qx{../src/task rc:args.rc add five};
|
qx{../src/task rc:args.rc add five 2>&1};
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 1 done oneanno};
|
qx{../src/task rc:args.rc 1 done oneanno 2>&1};
|
||||||
my $output = qx{../src/task rc:args.rc 1 info};
|
my $output = qx{../src/task rc:args.rc 1 info 2>&1};
|
||||||
like ($output, qr/oneanno/, 'done enpassant anno');
|
like ($output, qr/oneanno/, 'done enpassant anno');
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 2 done /two/TWO/};
|
qx{../src/task rc:args.rc 2 done /two/TWO/ 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc 2 info};
|
$output = qx{../src/task rc:args.rc 2 info 2>&1};
|
||||||
like ($output, qr/Description\s+TWO/, 'done enpassant subst');
|
like ($output, qr/Description\s+TWO/, 'done enpassant subst');
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 3 done +threetag};
|
qx{../src/task rc:args.rc 3 done +threetag 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc 3 info};
|
$output = qx{../src/task rc:args.rc 3 info 2>&1};
|
||||||
like ($output, qr/Tags\s+threetag/, 'done enpassant tag');
|
like ($output, qr/Tags\s+threetag/, 'done enpassant tag');
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 4 done pri:H};
|
qx{../src/task rc:args.rc 4 done pri:H 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc 4 info};
|
$output = qx{../src/task rc:args.rc 4 info 2>&1};
|
||||||
like ($output, qr/Priority\s+H/, 'done enpassant priority');
|
like ($output, qr/Priority\s+H/, 'done enpassant priority');
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 5 done pro:A};
|
qx{../src/task rc:args.rc 5 done pro:A 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc 5 info};
|
$output = qx{../src/task rc:args.rc 5 info 2>&1};
|
||||||
like ($output, qr/Project\s+A/, 'done enpassant project');
|
like ($output, qr/Project\s+A/, 'done enpassant project');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -40,30 +40,30 @@ if (open my $fh, '>', 'args.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test 'delete' with en-passant changes.
|
# Test 'delete' with en-passant changes.
|
||||||
qx{../src/task rc:args.rc add one};
|
qx{../src/task rc:args.rc add one 2>&1};
|
||||||
qx{../src/task rc:args.rc add two};
|
qx{../src/task rc:args.rc add two 2>&1};
|
||||||
qx{../src/task rc:args.rc add three};
|
qx{../src/task rc:args.rc add three 2>&1};
|
||||||
qx{../src/task rc:args.rc add four};
|
qx{../src/task rc:args.rc add four 2>&1};
|
||||||
qx{../src/task rc:args.rc add five};
|
qx{../src/task rc:args.rc add five 2>&1};
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 1 delete oneanno};
|
qx{../src/task rc:args.rc 1 delete oneanno 2>&1};
|
||||||
my $output = qx{../src/task rc:args.rc 1 info};
|
my $output = qx{../src/task rc:args.rc 1 info 2>&1};
|
||||||
like ($output, qr/oneanno/, 'delete enpassant anno');
|
like ($output, qr/oneanno/, 'delete enpassant anno');
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 2 delete /two/TWO/};
|
qx{../src/task rc:args.rc 2 delete /two/TWO/ 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc 2 info};
|
$output = qx{../src/task rc:args.rc 2 info 2>&1};
|
||||||
like ($output, qr/Description\s+TWO/, 'delete enpassant subst');
|
like ($output, qr/Description\s+TWO/, 'delete enpassant subst');
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 3 delete +threetag};
|
qx{../src/task rc:args.rc 3 delete +threetag 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc 3 info};
|
$output = qx{../src/task rc:args.rc 3 info 2>&1};
|
||||||
like ($output, qr/Tags\s+threetag/, 'delete enpassant tag');
|
like ($output, qr/Tags\s+threetag/, 'delete enpassant tag');
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 4 delete pri:H};
|
qx{../src/task rc:args.rc 4 delete pri:H 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc 4 info};
|
$output = qx{../src/task rc:args.rc 4 info 2>&1};
|
||||||
like ($output, qr/Priority\s+H/, 'delete enpassant priority');
|
like ($output, qr/Priority\s+H/, 'delete enpassant priority');
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 5 delete pro:A};
|
qx{../src/task rc:args.rc 5 delete pro:A 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc 5 info};
|
$output = qx{../src/task rc:args.rc 5 info 2>&1};
|
||||||
like ($output, qr/Project\s+A/, 'delete enpassant project');
|
like ($output, qr/Project\s+A/, 'delete enpassant project');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -40,30 +40,30 @@ if (open my $fh, '>', 'args.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test 'start' with en-passant changes.
|
# Test 'start' with en-passant changes.
|
||||||
qx{../src/task rc:args.rc add one};
|
qx{../src/task rc:args.rc add one 2>&1};
|
||||||
qx{../src/task rc:args.rc add two};
|
qx{../src/task rc:args.rc add two 2>&1};
|
||||||
qx{../src/task rc:args.rc add three};
|
qx{../src/task rc:args.rc add three 2>&1};
|
||||||
qx{../src/task rc:args.rc add four};
|
qx{../src/task rc:args.rc add four 2>&1};
|
||||||
qx{../src/task rc:args.rc add five};
|
qx{../src/task rc:args.rc add five 2>&1};
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 1 start oneanno};
|
qx{../src/task rc:args.rc 1 start oneanno 2>&1};
|
||||||
my $output = qx{../src/task rc:args.rc 1 info};
|
my $output = qx{../src/task rc:args.rc 1 info 2>&1};
|
||||||
like ($output, qr/oneanno/, 'start enpassant anno');
|
like ($output, qr/oneanno/, 'start enpassant anno');
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 2 start /two/TWO/};
|
qx{../src/task rc:args.rc 2 start /two/TWO/ 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc 2 info};
|
$output = qx{../src/task rc:args.rc 2 info 2>&1};
|
||||||
like ($output, qr/Description\s+TWO/, 'start enpassant subst');
|
like ($output, qr/Description\s+TWO/, 'start enpassant subst');
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 3 start +threetag};
|
qx{../src/task rc:args.rc 3 start +threetag 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc 3 info};
|
$output = qx{../src/task rc:args.rc 3 info 2>&1};
|
||||||
like ($output, qr/Tags\s+threetag/, 'start enpassant tag');
|
like ($output, qr/Tags\s+threetag/, 'start enpassant tag');
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 4 start pri:H};
|
qx{../src/task rc:args.rc 4 start pri:H 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc 4 info};
|
$output = qx{../src/task rc:args.rc 4 info 2>&1};
|
||||||
like ($output, qr/Priority\s+H/, 'start enpassant priority');
|
like ($output, qr/Priority\s+H/, 'start enpassant priority');
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 5 start pro:A};
|
qx{../src/task rc:args.rc 5 start pro:A 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc 5 info};
|
$output = qx{../src/task rc:args.rc 5 info 2>&1};
|
||||||
like ($output, qr/Project\s+A/, 'start enpassant project');
|
like ($output, qr/Project\s+A/, 'start enpassant project');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -40,36 +40,36 @@ if (open my $fh, '>', 'args.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test 'stop' with en-passant changes.
|
# Test 'stop' with en-passant changes.
|
||||||
qx{../src/task rc:args.rc add one};
|
qx{../src/task rc:args.rc add one 2>&1};
|
||||||
qx{../src/task rc:args.rc add two};
|
qx{../src/task rc:args.rc add two 2>&1};
|
||||||
qx{../src/task rc:args.rc add three};
|
qx{../src/task rc:args.rc add three 2>&1};
|
||||||
qx{../src/task rc:args.rc add four};
|
qx{../src/task rc:args.rc add four 2>&1};
|
||||||
qx{../src/task rc:args.rc add five};
|
qx{../src/task rc:args.rc add five 2>&1};
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 1 start};
|
qx{../src/task rc:args.rc 1 start 2>&1};
|
||||||
qx{../src/task rc:args.rc 2 start};
|
qx{../src/task rc:args.rc 2 start 2>&1};
|
||||||
qx{../src/task rc:args.rc 3 start};
|
qx{../src/task rc:args.rc 3 start 2>&1};
|
||||||
qx{../src/task rc:args.rc 4 start};
|
qx{../src/task rc:args.rc 4 start 2>&1};
|
||||||
qx{../src/task rc:args.rc 5 start};
|
qx{../src/task rc:args.rc 5 start 2>&1};
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 1 stop oneanno};
|
qx{../src/task rc:args.rc 1 stop oneanno 2>&1};
|
||||||
my $output = qx{../src/task rc:args.rc 1 info};
|
my $output = qx{../src/task rc:args.rc 1 info 2>&1};
|
||||||
like ($output, qr/oneanno/, 'stop enpassant anno');
|
like ($output, qr/oneanno/, 'stop enpassant anno');
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 2 stop /two/TWO/};
|
qx{../src/task rc:args.rc 2 stop /two/TWO/ 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc 2 info};
|
$output = qx{../src/task rc:args.rc 2 info 2>&1};
|
||||||
like ($output, qr/Description\s+TWO/, 'stop enpassant subst');
|
like ($output, qr/Description\s+TWO/, 'stop enpassant subst');
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 3 stop +threetag};
|
qx{../src/task rc:args.rc 3 stop +threetag 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc 3 info};
|
$output = qx{../src/task rc:args.rc 3 info 2>&1};
|
||||||
like ($output, qr/Tags\s+threetag/, 'stop enpassant tag');
|
like ($output, qr/Tags\s+threetag/, 'stop enpassant tag');
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 4 stop pri:H};
|
qx{../src/task rc:args.rc 4 stop pri:H 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc 4 info};
|
$output = qx{../src/task rc:args.rc 4 info 2>&1};
|
||||||
like ($output, qr/Priority\s+H/, 'stop enpassant priority');
|
like ($output, qr/Priority\s+H/, 'stop enpassant priority');
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 5 stop pro:A};
|
qx{../src/task rc:args.rc 5 stop pro:A 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc 5 info};
|
$output = qx{../src/task rc:args.rc 5 info 2>&1};
|
||||||
like ($output, qr/Project\s+A/, 'stop enpassant project');
|
like ($output, qr/Project\s+A/, 'stop enpassant project');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
20
test/args.t
20
test/args.t
|
@ -40,24 +40,24 @@ if (open my $fh, '>', 'args.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test the -- argument.
|
# Test the -- argument.
|
||||||
qx{../src/task rc:args.rc add project:p pri:H +tag foo};
|
qx{../src/task rc:args.rc add project:p pri:H +tag foo 2>&1};
|
||||||
my $output = qx{../src/task rc:args.rc info 1};
|
my $output = qx{../src/task rc:args.rc info 1 2>&1};
|
||||||
like ($output, qr/Description\s+foo\n/ms, 'task add project:p pri:H +tag foo');
|
like ($output, qr/Description\s+foo\n/ms, 'task add project:p pri:H +tag foo');
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 1 modify project:p pri:H +tag -- foo};
|
qx{../src/task rc:args.rc 1 modify project:p pri:H +tag -- foo 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc info 1};
|
$output = qx{../src/task rc:args.rc info 1 2>&1};
|
||||||
like ($output, qr/Description\s+foo\n/ms, 'task 1 modify project:p pri:H +tag -- foo');
|
like ($output, qr/Description\s+foo\n/ms, 'task 1 modify project:p pri:H +tag -- foo');
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 1 modify project:p pri:H -- +tag foo};
|
qx{../src/task rc:args.rc 1 modify project:p pri:H -- +tag foo 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc info 1};
|
$output = qx{../src/task rc:args.rc info 1 2>&1};
|
||||||
like ($output, qr/Description\s+\+tag\sfoo\n/ms, 'task 1 modify project:p pri:H -- +tag foo');
|
like ($output, qr/Description\s+\+tag\sfoo\n/ms, 'task 1 modify project:p pri:H -- +tag foo');
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 1 modify project:p -- pri:H +tag foo};
|
qx{../src/task rc:args.rc 1 modify project:p -- pri:H +tag foo 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc info 1};
|
$output = qx{../src/task rc:args.rc info 1 2>&1};
|
||||||
like ($output, qr/Description\s+pri:H\s\+tag\sfoo\n/ms, 'task 1 modify project:p -- pri:H +tag foo');
|
like ($output, qr/Description\s+pri:H\s\+tag\sfoo\n/ms, 'task 1 modify project:p -- pri:H +tag foo');
|
||||||
|
|
||||||
qx{../src/task rc:args.rc 1 modify -- project:p pri:H +tag foo};
|
qx{../src/task rc:args.rc 1 modify -- project:p pri:H +tag foo 2>&1};
|
||||||
$output = qx{../src/task rc:args.rc info 1};
|
$output = qx{../src/task rc:args.rc info 1 2>&1};
|
||||||
like ($output, qr/Description\s+project:p\spri:H\s\+tag\sfoo\n/ms, 'task 1 modify -- project:p pri:H +tag foo');
|
like ($output, qr/Description\s+project:p\spri:H\s\+tag\sfoo\n/ms, 'task 1 modify -- project:p pri:H +tag foo');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -39,8 +39,8 @@ if (open my $fh, '>', 'backslash.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add a description with a backslash.
|
# Add a description with a backslash.
|
||||||
qx{../src/task rc:backslash.rc add \\\\};
|
qx{../src/task rc:backslash.rc add \\\\ 2>&1};
|
||||||
my $output = qx{../src/task rc:backslash.rc ls};
|
my $output = qx{../src/task rc:backslash.rc ls 2>&1};
|
||||||
like ($output, qr/\\/, 'Backslash preserved, no parsing issues');
|
like ($output, qr/\\/, 'Backslash preserved, no parsing issues');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -47,13 +47,13 @@ my $output = qx{../src/task rc:basic.rc 2>&1 >/dev/null};
|
||||||
like ($output, qr/You must specify a command or a task to modify./m, 'missing command and ID');
|
like ($output, qr/You must specify a command or a task to modify./m, 'missing command and ID');
|
||||||
|
|
||||||
# Test the version command.
|
# Test the version command.
|
||||||
$output = qx{../src/task rc:basic.rc version};
|
$output = qx{../src/task rc:basic.rc version 2>&1};
|
||||||
like ($output, qr/task $version/, 'version - task version number');
|
like ($output, qr/task $version/, 'version - task version number');
|
||||||
like ($output, qr/MIT\slicense/, 'version - license');
|
like ($output, qr/MIT\slicense/, 'version - license');
|
||||||
like ($output, qr/http:\/\/taskwarrior\.org/, 'version - url');
|
like ($output, qr/http:\/\/taskwarrior\.org/, 'version - url');
|
||||||
|
|
||||||
# Test the _version command.
|
# Test the _version command.
|
||||||
$output = qx{../src/task rc:basic.rc _version};
|
$output = qx{../src/task rc:basic.rc _version 2>&1};
|
||||||
like ($output, qr/$version/, '_version - task version number');
|
like ($output, qr/$version/, '_version - task version number');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -43,16 +43,16 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
# This is because DOM elements are checked before standard words when strings
|
# This is because DOM elements are checked before standard words when strings
|
||||||
# are tokenized.
|
# are tokenized.
|
||||||
|
|
||||||
qx{../src/task rc:bug.rc add des};
|
qx{../src/task rc:bug.rc add des 2>&1};
|
||||||
qx{../src/task rc:bug.rc 1 annotate des};
|
qx{../src/task rc:bug.rc 1 annotate des 2>&1};
|
||||||
my $output = qx{../src/task rc:bug.rc 1 info};
|
my $output = qx{../src/task rc:bug.rc 1 info 2>&1};
|
||||||
unlike ($output, qr/description/ms, 'Attribute not completed in description');
|
unlike ($output, qr/description/ms, 'Attribute not completed in description');
|
||||||
|
|
||||||
$output = qx{../src/task test rc:bug.rc rc.report.test.columns:description rc.report.test.labels:__};
|
$output = qx{../src/task test rc:bug.rc rc.report.test.columns:description rc.report.test.labels:__ 2>&1};
|
||||||
like ($output, qr/__/ms, 'Custom column present in the output');
|
like ($output, qr/__/ms, 'Custom column present in the output');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc add entrée interdite};
|
$output = qx{../src/task rc:bug.rc add entrée interdite 2>&1};
|
||||||
$output = qx{../src/task rc:bug.rc list interdite};
|
$output = qx{../src/task rc:bug.rc list interdite 2>&1};
|
||||||
like ($output, qr/entrée interdite/, "'entrée' left intact");
|
like ($output, qr/entrée interdite/, "'entrée' left intact");
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -40,13 +40,13 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Setup: Add three unique tasks with different project names.
|
# Setup: Add three unique tasks with different project names.
|
||||||
qx{../src/task rc:bug.rc add project:one foo};
|
qx{../src/task rc:bug.rc add project:one foo 2>&1};
|
||||||
qx{../src/task rc:bug.rc add project:two bar};
|
qx{../src/task rc:bug.rc add project:two bar 2>&1};
|
||||||
qx{../src/task rc:bug.rc add project:three baz};
|
qx{../src/task rc:bug.rc add project:three baz 2>&1};
|
||||||
|
|
||||||
# Result: Run list but exclude two of the three projects names using
|
# Result: Run list but exclude two of the three projects names using
|
||||||
# project.hasnt:<name>
|
# project.hasnt:<name>
|
||||||
my $output = qx{../src/task rc:bug.rc list project.isnt:one project.isnt:two};
|
my $output = qx{../src/task rc:bug.rc list project.isnt:one project.isnt:two 2>&1};
|
||||||
unlike ($output, qr/one.*foo/ms, 'project.isnt:one project.isnt:two - no foo');
|
unlike ($output, qr/one.*foo/ms, 'project.isnt:one project.isnt:two - no foo');
|
||||||
unlike ($output, qr/two.*bar/ms, 'project.isnt:one project.isnt:two - no bar');
|
unlike ($output, qr/two.*bar/ms, 'project.isnt:one project.isnt:two - no bar');
|
||||||
like ($output, qr/three.*baz/ms, 'project.isnt:one project.isnt:two - yes baz');
|
like ($output, qr/three.*baz/ms, 'project.isnt:one project.isnt:two - yes baz');
|
||||||
|
|
|
@ -40,13 +40,13 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Setup: Add a recurring task then remove the due date.
|
# Setup: Add a recurring task then remove the due date.
|
||||||
qx{../src/task rc:bug.rc add foo recur:yearly due:eoy};
|
qx{../src/task rc:bug.rc add foo recur:yearly due:eoy 2>&1};
|
||||||
qx{../src/task rc:bug.rc li};
|
qx{../src/task rc:bug.rc li 2>&1};
|
||||||
qx{../src/task rc:bug.rc 2 modify due:};
|
qx{../src/task rc:bug.rc 2 modify due: 2>&1};
|
||||||
|
|
||||||
# Result: Somehow the due date is incremented and wraps around to 12/31/1969,
|
# Result: Somehow the due date is incremented and wraps around to 12/31/1969,
|
||||||
# then keeps going back to today.
|
# then keeps going back to today.
|
||||||
my $output = qx{../src/task rc:bug.rc li};
|
my $output = qx{../src/task rc:bug.rc li 2>&1};
|
||||||
unlike ($output, qr/1969/ms, 'Should not display 12/31/1969');
|
unlike ($output, qr/1969/ms, 'Should not display 12/31/1969');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -40,8 +40,8 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Setup: Add a recurring task, generate an instance, then add a project.
|
# Setup: Add a recurring task, generate an instance, then add a project.
|
||||||
qx{../src/task rc:bug.rc add foo due:tomorrow recur:daily};
|
qx{../src/task rc:bug.rc add foo due:tomorrow recur:daily 2>&1};
|
||||||
qx{../src/task rc:bug.rc ls};
|
qx{../src/task rc:bug.rc ls 2>&1};
|
||||||
|
|
||||||
# Result: trying to add the project generates an error about removing
|
# Result: trying to add the project generates an error about removing
|
||||||
# recurrence from a task.
|
# recurrence from a task.
|
||||||
|
@ -60,13 +60,13 @@ $output = qx{../src/task rc:bug.rc 2 modify due: 2>&1 >/dev/null};
|
||||||
like ($output, qr/You cannot remove the due date from a recurring task./ms, 'Cannot remove due date from a recurring task');
|
like ($output, qr/You cannot remove the due date from a recurring task./ms, 'Cannot remove due date from a recurring task');
|
||||||
|
|
||||||
# Allow removal of the due date from a non-recurring task.
|
# Allow removal of the due date from a non-recurring task.
|
||||||
qx{../src/task rc:bug.rc add nonrecurring};
|
qx{../src/task rc:bug.rc add nonrecurring 2>&1};
|
||||||
$output = qx{../src/task rc:bug.rc ls};
|
$output = qx{../src/task rc:bug.rc ls 2>&1};
|
||||||
my ($id) = $output =~ /(\d+)\s+nonrecurring/;
|
my ($id) = $output =~ /(\d+)\s+nonrecurring/;
|
||||||
$output = qx{../src/task rc:bug.rc $id modify due: 2>&1 >/dev/null};
|
$output = qx{../src/task rc:bug.rc $id modify due: 2>&1 >/dev/null};
|
||||||
unlike ($output, qr/You cannot remove the due date from a recurring task./ms, 'Can remove due date from a non-recurring task');
|
unlike ($output, qr/You cannot remove the due date from a recurring task./ms, 'Can remove due date from a non-recurring task');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc diag};
|
$output = qx{../src/task rc:bug.rc diag 2>&1};
|
||||||
like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected');
|
like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -41,8 +41,8 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Setup: Add a recurring task, generate an instance, then add a project.
|
# Setup: Add a recurring task, generate an instance, then add a project.
|
||||||
qx{../src/task rc:bug.rc add foo due:today recur:daily until:eom};
|
qx{../src/task rc:bug.rc add foo due:today recur:daily until:eom 2>&1};
|
||||||
my $output = qx{../src/task rc:bug.rc info 1};
|
my $output = qx{../src/task rc:bug.rc info 1 2>&1};
|
||||||
|
|
||||||
# Result: Make sure the 'until' date is rendered as a date, not an epoch.
|
# Result: Make sure the 'until' date is rendered as a date, not an epoch.
|
||||||
unlike ($output, qr/Until\s+\d{10}/, 'until is not shown as an epoch');
|
unlike ($output, qr/Until\s+\d{10}/, 'until is not shown as an epoch');
|
||||||
|
|
|
@ -41,19 +41,19 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
# Bug #414: Tags filtering not working with unicode characters
|
# Bug #414: Tags filtering not working with unicode characters
|
||||||
|
|
||||||
# Add a task with a UTF-8 tag.
|
# Add a task with a UTF-8 tag.
|
||||||
qx{../src/task rc:bug.rc add one +osobní};
|
qx{../src/task rc:bug.rc add one +osobní 2>&1};
|
||||||
my $output = qx{../src/task rc:bug.rc ls +osobní};
|
my $output = qx{../src/task rc:bug.rc ls +osobní 2>&1};
|
||||||
like ($output, qr/one/, 'found UTF8 tag osobní');
|
like ($output, qr/one/, 'found UTF8 tag osobní');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc ls -osobní};
|
$output = qx{../src/task rc:bug.rc ls -osobní 2>&1};
|
||||||
unlike ($output, qr/one/, 'not found UTF8 tag osobní');
|
unlike ($output, qr/one/, 'not found UTF8 tag osobní');
|
||||||
|
|
||||||
# And a different one
|
# And a different one
|
||||||
qx{../src/task rc:bug.rc add two +föo};
|
qx{../src/task rc:bug.rc add two +föo 2>&1};
|
||||||
$output = qx{../src/task rc:bug.rc ls +föo};
|
$output = qx{../src/task rc:bug.rc ls +föo 2>&1};
|
||||||
like ($output, qr/two/, 'found UTF8 tag föo');
|
like ($output, qr/two/, 'found UTF8 tag föo');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc ls -föo};
|
$output = qx{../src/task rc:bug.rc ls -föo 2>&1};
|
||||||
unlike ($output, qr/two/, 'not found UTF8 tag föo');
|
unlike ($output, qr/two/, 'not found UTF8 tag föo');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -40,14 +40,14 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Bug #417: Sorting by countdown_compact not working
|
# Bug #417: Sorting by countdown_compact not working
|
||||||
qx{../src/task rc:bug.rc add due:yesterday before};
|
qx{../src/task rc:bug.rc add due:yesterday before 2>&1};
|
||||||
qx{../src/task rc:bug.rc add due:today now};
|
qx{../src/task rc:bug.rc add due:today now 2>&1};
|
||||||
qx{../src/task rc:bug.rc add due:tomorrow after};
|
qx{../src/task rc:bug.rc add due:tomorrow after 2>&1};
|
||||||
|
|
||||||
my $output = qx{../src/task rc:bug.rc rc.report.long.sort:due+ long};
|
my $output = qx{../src/task rc:bug.rc rc.report.long.sort:due+ long 2>&1};
|
||||||
like ($output, qr/before.+now.+after/ms, 'rc.report.long.sort:due+ works');
|
like ($output, qr/before.+now.+after/ms, 'rc.report.long.sort:due+ works');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc rc.report.long.sort:due- long};
|
$output = qx{../src/task rc:bug.rc rc.report.long.sort:due- long 2>&1};
|
||||||
like ($output, qr/after.+now.+before/ms, 'rc.report.long.sort:due- works');
|
like ($output, qr/after.+now.+before/ms, 'rc.report.long.sort:due- works');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -47,17 +47,17 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
|
|
||||||
# Bug #418: due.before:eow not working
|
# Bug #418: due.before:eow not working
|
||||||
# - with dateformat 'MD'
|
# - with dateformat 'MD'
|
||||||
qx{../src/task rc:bug.rc add one due:6/28/2010};
|
qx{../src/task rc:bug.rc add one due:6/28/2010 2>&1};
|
||||||
qx{../src/task rc:bug.rc add two due:6/29/2010};
|
qx{../src/task rc:bug.rc add two due:6/29/2010 2>&1};
|
||||||
qx{../src/task rc:bug.rc add three due:6/30/2010};
|
qx{../src/task rc:bug.rc add three due:6/30/2010 2>&1};
|
||||||
qx{../src/task rc:bug.rc add four due:7/1/2010};
|
qx{../src/task rc:bug.rc add four due:7/1/2010 2>&1};
|
||||||
qx{../src/task rc:bug.rc add five due:7/2/2010};
|
qx{../src/task rc:bug.rc add five due:7/2/2010 2>&1};
|
||||||
qx{../src/task rc:bug.rc add six due:7/3/2010};
|
qx{../src/task rc:bug.rc add six due:7/3/2010 2>&1};
|
||||||
qx{../src/task rc:bug.rc add seven due:7/4/2010};
|
qx{../src/task rc:bug.rc add seven due:7/4/2010 2>&1};
|
||||||
qx{../src/task rc:bug.rc add eight due:7/5/2010};
|
qx{../src/task rc:bug.rc add eight due:7/5/2010 2>&1};
|
||||||
qx{../src/task rc:bug.rc add nine due:7/6/2010};
|
qx{../src/task rc:bug.rc add nine due:7/6/2010 2>&1};
|
||||||
|
|
||||||
my $output = qx{../src/task rc:bug.rc foo};
|
my $output = qx{../src/task rc:bug.rc foo 2>&1};
|
||||||
like ($output, qr/one/ms, 'task 1 listed');
|
like ($output, qr/one/ms, 'task 1 listed');
|
||||||
like ($output, qr/two/ms, 'task 2 listed');
|
like ($output, qr/two/ms, 'task 2 listed');
|
||||||
like ($output, qr/three/ms, 'task 3 listed');
|
like ($output, qr/three/ms, 'task 3 listed');
|
||||||
|
@ -68,7 +68,7 @@ like ($output, qr/seven/ms, 'task 7 listed');
|
||||||
like ($output, qr/eight/ms, 'task 8 listed');
|
like ($output, qr/eight/ms, 'task 8 listed');
|
||||||
like ($output, qr/nine/ms, 'task 9 listed');
|
like ($output, qr/nine/ms, 'task 9 listed');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc foo due.before:7/2/2010};
|
$output = qx{../src/task rc:bug.rc foo due.before:7/2/2010 2>&1};
|
||||||
like ($output, qr/one/ms, 'task 1 listed');
|
like ($output, qr/one/ms, 'task 1 listed');
|
||||||
like ($output, qr/two/ms, 'task 2 listed');
|
like ($output, qr/two/ms, 'task 2 listed');
|
||||||
like ($output, qr/three/ms, 'task 3 listed');
|
like ($output, qr/three/ms, 'task 3 listed');
|
||||||
|
|
|
@ -45,10 +45,10 @@ if (open my $fh, '>', '425.rc')
|
||||||
# Create a task and attempt to revise the description to include the word 'in'
|
# Create a task and attempt to revise the description to include the word 'in'
|
||||||
# (this breaks in 1.9.3 and earlier)
|
# (this breaks in 1.9.3 and earlier)
|
||||||
|
|
||||||
qx{../src/task rc:425.rc add Foo};
|
qx{../src/task rc:425.rc add Foo 2>&1};
|
||||||
qx{../src/task rc:425.rc 1 modify Bar in Bar};
|
qx{../src/task rc:425.rc 1 modify Bar in Bar 2>&1};
|
||||||
|
|
||||||
my $output = qx{../src/task rc:425.rc 1 ls};
|
my $output = qx{../src/task rc:425.rc 1 ls 2>&1};
|
||||||
like ($output, qr/1\s+Bar in Bar/m, 'parser - interpret \'in\' in description');
|
like ($output, qr/1\s+Bar in Bar/m, 'parser - interpret \'in\' in description');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -42,8 +42,8 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
# Bug #434: Task shouldn't prevent users from marking as done tasks with status:waiting
|
# Bug #434: Task shouldn't prevent users from marking as done tasks with status:waiting
|
||||||
|
|
||||||
# Add a task that is waiting
|
# Add a task that is waiting
|
||||||
qx{../src/task rc:bug.rc add One wait:tomorrow};
|
qx{../src/task rc:bug.rc add One wait:tomorrow 2>&1};
|
||||||
my $output = qx{../src/task rc:bug.rc 1 done};
|
my $output = qx{../src/task rc:bug.rc 1 done 2>&1};
|
||||||
like ($output, qr/Completed 1 task\./, 'Waiting task marked completed');
|
like ($output, qr/Completed 1 task\./, 'Waiting task marked completed');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -46,39 +46,39 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
# time is included.
|
# time is included.
|
||||||
|
|
||||||
# Ensure the two tasks have a 1 second delta in entry.
|
# Ensure the two tasks have a 1 second delta in entry.
|
||||||
qx{../src/task rc:bug.rc add older};
|
qx{../src/task rc:bug.rc add older 2>&1};
|
||||||
diag ("1 second delay");
|
diag ("1 second delay");
|
||||||
sleep 1;
|
sleep 1;
|
||||||
qx{../src/task rc:bug.rc add newer};
|
qx{../src/task rc:bug.rc add newer 2>&1};
|
||||||
|
|
||||||
my $output = qx{../src/task rc:bug.rc rc.report.foo.sort:entry+ foo};
|
my $output = qx{../src/task rc:bug.rc rc.report.foo.sort:entry+ foo 2>&1};
|
||||||
like ($output, qr/older.+newer/ms, 'sort:entry+ -> older newer');
|
like ($output, qr/older.+newer/ms, 'sort:entry+ -> older newer');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc rc.report.foo.sort:entry- foo};
|
$output = qx{../src/task rc:bug.rc rc.report.foo.sort:entry- foo 2>&1};
|
||||||
like ($output, qr/newer.+older/ms, 'sort:entry- -> newer older');
|
like ($output, qr/newer.+older/ms, 'sort:entry- -> newer older');
|
||||||
|
|
||||||
# Ensure the two tasks have a 1 second delta in start.
|
# Ensure the two tasks have a 1 second delta in start.
|
||||||
qx{../src/task rc:bug.rc 1 start};
|
qx{../src/task rc:bug.rc 1 start 2>&1};
|
||||||
diag ("1 second delay");
|
diag ("1 second delay");
|
||||||
sleep 1;
|
sleep 1;
|
||||||
qx{../src/task rc:bug.rc 2 start};
|
qx{../src/task rc:bug.rc 2 start 2>&1};
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc rc.report.foo.sort:start+ foo};
|
$output = qx{../src/task rc:bug.rc rc.report.foo.sort:start+ foo 2>&1};
|
||||||
like ($output, qr/older.+newer/ms, 'sort:start+ -> older newer');
|
like ($output, qr/older.+newer/ms, 'sort:start+ -> older newer');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc rc.report.foo.sort:start- foo};
|
$output = qx{../src/task rc:bug.rc rc.report.foo.sort:start- foo 2>&1};
|
||||||
like ($output, qr/newer.+older/ms, 'sort:start- -> newer older');
|
like ($output, qr/newer.+older/ms, 'sort:start- -> newer older');
|
||||||
|
|
||||||
# Ensure the two tasks have a 1 second delta in end.
|
# Ensure the two tasks have a 1 second delta in end.
|
||||||
qx{../src/task rc:bug.rc 1 done};
|
qx{../src/task rc:bug.rc 1 done 2>&1};
|
||||||
diag ("1 second delay");
|
diag ("1 second delay");
|
||||||
sleep 1;
|
sleep 1;
|
||||||
qx{../src/task rc:bug.rc 2 done};
|
qx{../src/task rc:bug.rc 2 done 2>&1};
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc rc.report.foo.sort:end+ foo};
|
$output = qx{../src/task rc:bug.rc rc.report.foo.sort:end+ foo 2>&1};
|
||||||
like ($output, qr/older.+newer/ms, 'sort:end+ -> older newer');
|
like ($output, qr/older.+newer/ms, 'sort:end+ -> older newer');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc rc.report.foo.sort:end- foo};
|
$output = qx{../src/task rc:bug.rc rc.report.foo.sort:end- foo 2>&1};
|
||||||
like ($output, qr/newer.+older/ms, 'sort:end- -> newer older');
|
like ($output, qr/newer.+older/ms, 'sort:end- -> newer older');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -44,14 +44,14 @@ if (open my $fh, '>', '440.rc')
|
||||||
|
|
||||||
# Create a task and attempt simultaneous subst and appends, both permutations
|
# Create a task and attempt simultaneous subst and appends, both permutations
|
||||||
|
|
||||||
qx{../src/task rc:440.rc add Foo};
|
qx{../src/task rc:440.rc add Foo 2>&1};
|
||||||
qx{../src/task rc:440.rc add Foo};
|
qx{../src/task rc:440.rc add Foo 2>&1};
|
||||||
|
|
||||||
qx{../src/task rc:440.rc 1 append /Foo/Bar/ Appendtext};
|
qx{../src/task rc:440.rc 1 append /Foo/Bar/ Appendtext 2>&1};
|
||||||
qx{../src/task rc:440.rc 2 append Appendtext /Foo/Bar/};
|
qx{../src/task rc:440.rc 2 append Appendtext /Foo/Bar/ 2>&1};
|
||||||
|
|
||||||
my $output1 = qx{../src/task rc:440.rc 1 ls};
|
my $output1 = qx{../src/task rc:440.rc 1 ls 2>&1};
|
||||||
my $output2 = qx{../src/task rc:440.rc 2 ls};
|
my $output2 = qx{../src/task rc:440.rc 2 ls 2>&1};
|
||||||
|
|
||||||
unlike ($output1, qr/Foo/, 'simultaneous subst and append - subst');
|
unlike ($output1, qr/Foo/, 'simultaneous subst and append - subst');
|
||||||
like ($output1, qr/\w+ Appendtext/, 'simultaneous subst and append - append');
|
like ($output1, qr/\w+ Appendtext/, 'simultaneous subst and append - append');
|
||||||
|
|
|
@ -41,9 +41,9 @@ if (open my $fh, '>', '441.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Bug #441: A colon messes up text replacement with ///
|
# Bug #441: A colon messes up text replacement with ///
|
||||||
qx{../src/task rc:441.rc add one two three};
|
qx{../src/task rc:441.rc add one two three 2>&1};
|
||||||
qx{../src/task rc:441.rc 1 modify /two/two:/};
|
qx{../src/task rc:441.rc 1 modify /two/two:/ 2>&1};
|
||||||
my $output = qx{../src/task rc:441.rc ls};
|
my $output = qx{../src/task rc:441.rc ls 2>&1};
|
||||||
like ($output, qr/one two: three/ms, 'Substitution with colon worked');
|
like ($output, qr/one two: three/ms, 'Substitution with colon worked');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -41,10 +41,10 @@ if (open my $fh, '>', '455.rc')
|
||||||
|
|
||||||
# Bug #455 - Text alignment in reports is broken when text contains utf8 characters
|
# Bug #455 - Text alignment in reports is broken when text contains utf8 characters
|
||||||
|
|
||||||
qx{../src/task rc:455.rc add abc pro:Bar\x{263A}};
|
qx{../src/task rc:455.rc add abc pro:Bar\x{263A} 2>&1};
|
||||||
qx{../src/task rc:455.rc add def pro:Foo!};
|
qx{../src/task rc:455.rc add def pro:Foo! 2>&1};
|
||||||
|
|
||||||
my $output = qx{../src/task rc:455.rc ls};
|
my $output = qx{../src/task rc:455.rc ls 2>&1};
|
||||||
|
|
||||||
like ($output, qr/\s{7}abc/ms, 'bug 455 - correct spacing in utf8 task');
|
like ($output, qr/\s{7}abc/ms, 'bug 455 - correct spacing in utf8 task');
|
||||||
like ($output, qr/\s{7}def/ms, 'bug 455 - correct spacing in non utf8 task');
|
like ($output, qr/\s{7}def/ms, 'bug 455 - correct spacing in non utf8 task');
|
||||||
|
|
|
@ -42,82 +42,82 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Bug #480 - putting a '@' character in tags breaks filters.
|
# Bug #480 - putting a '@' character in tags breaks filters.
|
||||||
qx{../src/task rc:bug.rc add one +ordinary};
|
qx{../src/task rc:bug.rc add one +ordinary 2>&1};
|
||||||
qx{../src/task rc:bug.rc add two +\@strange};
|
qx{../src/task rc:bug.rc add two +\@strange 2>&1};
|
||||||
|
|
||||||
my $output = qx{../src/task rc:bug.rc long +ordinary};
|
my $output = qx{../src/task rc:bug.rc long +ordinary 2>&1};
|
||||||
like ($output, qr/one/, '+ordinary explicitly included'); # 2
|
like ($output, qr/one/, '+ordinary explicitly included'); # 2
|
||||||
unlike ($output, qr/two/, '@strange implicitly excluded');
|
unlike ($output, qr/two/, '@strange implicitly excluded');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc long -ordinary};
|
$output = qx{../src/task rc:bug.rc long -ordinary 2>&1};
|
||||||
unlike ($output, qr/one/, '-ordinary explicitly excluded');
|
unlike ($output, qr/one/, '-ordinary explicitly excluded');
|
||||||
like ($output, qr/two/, '@strange implicitly included'); # 5
|
like ($output, qr/two/, '@strange implicitly included'); # 5
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc long +\@strange};
|
$output = qx{../src/task rc:bug.rc long +\@strange 2>&1};
|
||||||
unlike ($output, qr/one/, '-ordinary implicitly excluded');
|
unlike ($output, qr/one/, '-ordinary implicitly excluded');
|
||||||
like ($output, qr/two/, '@strange explicitly included'); # 7
|
like ($output, qr/two/, '@strange explicitly included'); # 7
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc long -\@strange};
|
$output = qx{../src/task rc:bug.rc long -\@strange 2>&1};
|
||||||
like ($output, qr/one/, '+ordinary implicitly included'); # 8
|
like ($output, qr/one/, '+ordinary implicitly included'); # 8
|
||||||
unlike ($output, qr/two/, '@strange explicitly excluded');
|
unlike ($output, qr/two/, '@strange explicitly excluded');
|
||||||
|
|
||||||
# Bug #XXX - '-t1 -t2' doesn't seem to work, when @ characters are involved.
|
# Bug #XXX - '-t1 -t2' doesn't seem to work, when @ characters are involved.
|
||||||
unlink 'pending.data';
|
unlink 'pending.data';
|
||||||
qx{../src/task rc:bug.rc add one +t1};
|
qx{../src/task rc:bug.rc add one +t1 2>&1};
|
||||||
qx{../src/task rc:bug.rc add two +t2};
|
qx{../src/task rc:bug.rc add two +t2 2>&1};
|
||||||
qx{../src/task rc:bug.rc add three +t3};
|
qx{../src/task rc:bug.rc add three +t3 2>&1};
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc list -t1};
|
$output = qx{../src/task rc:bug.rc list -t1 2>&1};
|
||||||
unlike ($output, qr/one/, 'Single: no t1');
|
unlike ($output, qr/one/, 'Single: no t1');
|
||||||
like ($output, qr/two/, 'Single: yes t2');
|
like ($output, qr/two/, 'Single: yes t2');
|
||||||
like ($output, qr/three/, 'Single: yes t3');
|
like ($output, qr/three/, 'Single: yes t3');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc list -t1 -t2};
|
$output = qx{../src/task rc:bug.rc list -t1 -t2 2>&1};
|
||||||
unlike ($output, qr/one/, 'Double: no t1');
|
unlike ($output, qr/one/, 'Double: no t1');
|
||||||
unlike ($output, qr/two/, 'Double: no t2');
|
unlike ($output, qr/two/, 'Double: no t2');
|
||||||
like ($output, qr/three/, 'Double: yes t3');
|
like ($output, qr/three/, 'Double: yes t3');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc list -t1 -t2 -t3};
|
$output = qx{../src/task rc:bug.rc list -t1 -t2 -t3 2>&1};
|
||||||
unlike ($output, qr/one/, 'Triple: no t1');
|
unlike ($output, qr/one/, 'Triple: no t1');
|
||||||
unlike ($output, qr/two/, 'Triple: no t2');
|
unlike ($output, qr/two/, 'Triple: no t2');
|
||||||
unlike ($output, qr/three/, 'Triple: no t3');
|
unlike ($output, qr/three/, 'Triple: no t3');
|
||||||
|
|
||||||
# Once again, with @ characters.
|
# Once again, with @ characters.
|
||||||
qx{../src/task rc:bug.rc 1 modify +\@1};
|
qx{../src/task rc:bug.rc 1 modify +\@1 2>&1};
|
||||||
qx{../src/task rc:bug.rc 2 modify +\@2};
|
qx{../src/task rc:bug.rc 2 modify +\@2 2>&1};
|
||||||
qx{../src/task rc:bug.rc 3 modify +\@3};
|
qx{../src/task rc:bug.rc 3 modify +\@3 2>&1};
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc list -\@1};
|
$output = qx{../src/task rc:bug.rc list -\@1 2>&1};
|
||||||
unlike ($output, qr/one/, 'Single: no @1'); # 19
|
unlike ($output, qr/one/, 'Single: no @1'); # 19
|
||||||
like ($output, qr/two/, 'Single: yes @2');
|
like ($output, qr/two/, 'Single: yes @2');
|
||||||
like ($output, qr/three/, 'Single: yes @3');
|
like ($output, qr/three/, 'Single: yes @3');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc list -\@1 -\@2};
|
$output = qx{../src/task rc:bug.rc list -\@1 -\@2 2>&1};
|
||||||
unlike ($output, qr/one/, 'Double: no @1');
|
unlike ($output, qr/one/, 'Double: no @1');
|
||||||
unlike ($output, qr/two/, 'Double: no @2');
|
unlike ($output, qr/two/, 'Double: no @2');
|
||||||
like ($output, qr/three/, 'Double: yes @3');
|
like ($output, qr/three/, 'Double: yes @3');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc list -\@1 -\@2 -\@3};
|
$output = qx{../src/task rc:bug.rc list -\@1 -\@2 -\@3 2>&1};
|
||||||
unlike ($output, qr/one/, 'Triple: no @1');
|
unlike ($output, qr/one/, 'Triple: no @1');
|
||||||
unlike ($output, qr/two/, 'Triple: no @2');
|
unlike ($output, qr/two/, 'Triple: no @2');
|
||||||
unlike ($output, qr/three/, 'Triple: no @3');
|
unlike ($output, qr/three/, 'Triple: no @3');
|
||||||
|
|
||||||
# Once again, with @ characters and punctuation.
|
# Once again, with @ characters and punctuation.
|
||||||
qx{../src/task rc:bug.rc 1 modify +\@foo.1};
|
qx{../src/task rc:bug.rc 1 modify +\@foo.1 2>&1};
|
||||||
qx{../src/task rc:bug.rc 2 modify +\@foo.2};
|
qx{../src/task rc:bug.rc 2 modify +\@foo.2 2>&1};
|
||||||
qx{../src/task rc:bug.rc 3 modify +\@foo.3};
|
qx{../src/task rc:bug.rc 3 modify +\@foo.3 2>&1};
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc list -\@foo.1};
|
$output = qx{../src/task rc:bug.rc list -\@foo.1 2>&1};
|
||||||
unlike ($output, qr/one/, 'Single: no @foo.1');
|
unlike ($output, qr/one/, 'Single: no @foo.1');
|
||||||
like ($output, qr/two/, 'Single: yes @foo.2');
|
like ($output, qr/two/, 'Single: yes @foo.2');
|
||||||
like ($output, qr/three/, 'Single: yes @foo.3');
|
like ($output, qr/three/, 'Single: yes @foo.3');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc list -\@foo.1 -\@foo.2};
|
$output = qx{../src/task rc:bug.rc list -\@foo.1 -\@foo.2 2>&1};
|
||||||
unlike ($output, qr/one/, 'Double: no @foo.1');
|
unlike ($output, qr/one/, 'Double: no @foo.1');
|
||||||
unlike ($output, qr/two/, 'Double: no @foo.2');
|
unlike ($output, qr/two/, 'Double: no @foo.2');
|
||||||
like ($output, qr/three/, 'Double: yes @foo.3');
|
like ($output, qr/three/, 'Double: yes @foo.3');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc list -\@foo.1 -\@foo.2 -\@foo.3};
|
$output = qx{../src/task rc:bug.rc list -\@foo.1 -\@foo.2 -\@foo.3 2>&1};
|
||||||
unlike ($output, qr/one/, 'Triple: no @foo.1');
|
unlike ($output, qr/one/, 'Triple: no @foo.1');
|
||||||
unlike ($output, qr/two/, 'Triple: no @foo.2');
|
unlike ($output, qr/two/, 'Triple: no @foo.2');
|
||||||
unlike ($output, qr/three/, 'Triple: no @foo.3');
|
unlike ($output, qr/three/, 'Triple: no @foo.3');
|
||||||
|
|
|
@ -40,9 +40,9 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Bug #489 - tags.none: is not filtering tagless tasks
|
# Bug #489 - tags.none: is not filtering tagless tasks
|
||||||
qx{../src/task rc:bug.rc add with +tag};
|
qx{../src/task rc:bug.rc add with +tag 2>&1};
|
||||||
qx{../src/task rc:bug.rc add without};
|
qx{../src/task rc:bug.rc add without 2>&1};
|
||||||
my $output = qx{../src/task rc:bug.rc list tags.none:};
|
my $output = qx{../src/task rc:bug.rc list tags.none: 2>&1};
|
||||||
unlike ($output, qr/with /, 'tags.none: skips tagged');
|
unlike ($output, qr/with /, 'tags.none: skips tagged');
|
||||||
like ($output, qr/without/, 'tags.none: finds tagless');
|
like ($output, qr/without/, 'tags.none: finds tagless');
|
||||||
|
|
||||||
|
|
|
@ -41,9 +41,9 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Bug #495 - double hyphen mishandled for annotations.
|
# Bug #495 - double hyphen mishandled for annotations.
|
||||||
qx{../src/task rc:bug.rc add foo};
|
qx{../src/task rc:bug.rc add foo 2>&1};
|
||||||
qx{../src/task rc:bug.rc 1 annotate "This -- is -- a -- test"};
|
qx{../src/task rc:bug.rc 1 annotate "This -- is -- a -- test" 2>&1};
|
||||||
my $output = qx{../src/task rc:bug.rc list};
|
my $output = qx{../src/task rc:bug.rc list 2>&1};
|
||||||
like ($output, qr/This is -- a -- test/, 'Double hyphens preserved, except the first ones.');
|
like ($output, qr/This is -- a -- test/, 'Double hyphens preserved, except the first ones.');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -40,7 +40,7 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Bug #555 - log with a project segfaults.
|
# Bug #555 - log with a project segfaults.
|
||||||
my $output = qx{../src/task rc:bug.rc log description project:p};
|
my $output = qx{../src/task rc:bug.rc log description project:p 2>&1};
|
||||||
unlike ($output, qr/Segmentation fault/, 'no segfault from log with project');
|
unlike ($output, qr/Segmentation fault/, 'no segfault from log with project');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -61,15 +61,15 @@ if (open my $fh, '>', 'remote.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# add a remote task
|
# add a remote task
|
||||||
qx{../src/task rc:remote.rc add remote task};
|
qx{../src/task rc:remote.rc add remote task 2>&1};
|
||||||
|
|
||||||
# add a local task
|
# add a local task
|
||||||
qx(../src/task rc:local.rc add local task);
|
qx{../src/task rc:local.rc add local task 2>&1};
|
||||||
|
|
||||||
# merge and autopush
|
# merge and autopush
|
||||||
qx{../src/task rc:local.rc merge};
|
qx{../src/task rc:local.rc merge 2>&1};
|
||||||
|
|
||||||
my $output = qx{../src/task rc:remote.rc ls};
|
my $output = qx{../src/task rc:remote.rc ls 2>&1};
|
||||||
like ($output, qr/local task/, "autopush failed");
|
like ($output, qr/local task/, "autopush failed");
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -42,14 +42,14 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
# Bug #605 - project count zero bug?
|
# Bug #605 - project count zero bug?
|
||||||
|
|
||||||
# Setup: Add a task and complete it
|
# Setup: Add a task and complete it
|
||||||
qx{../src/task rc:bug.rc add One project:p1};
|
qx{../src/task rc:bug.rc add One project:p1 2>&1};
|
||||||
|
|
||||||
# Delete the task and note the completion status of the project.
|
# Delete the task and note the completion status of the project.
|
||||||
my $output = qx{echo 'y' | ../src/task rc:bug.rc 1 delete 2>&1 >/dev/null};
|
my $output = qx{echo 'y' | ../src/task rc:bug.rc 1 delete 2>&1 >/dev/null};
|
||||||
like ($output, qr/is 0\% complete/ms, 'Empty project correctly reported as being 0% completed.');
|
like ($output, qr/is 0\% complete/ms, 'Empty project correctly reported as being 0% completed.');
|
||||||
|
|
||||||
# Add another task, complete it and note the completion status of hte project.
|
# Add another task, complete it and note the completion status of hte project.
|
||||||
qx{../src/task rc:bug.rc add Two project:p1};
|
qx{../src/task rc:bug.rc add Two project:p1 2>&1};
|
||||||
$output = qx{../src/task rc:bug.rc 2 done 2>&1 >/dev/null};
|
$output = qx{../src/task rc:bug.rc 2 done 2>&1 >/dev/null};
|
||||||
like ($output, qr/is 100\% complete/ms, 'Empty project correctly reported as being 100% completed.');
|
like ($output, qr/is 100\% complete/ms, 'Empty project correctly reported as being 100% completed.');
|
||||||
|
|
||||||
|
|
|
@ -43,10 +43,10 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
# Bug 628: task wait: with non-standard dateformat bug
|
# Bug 628: task wait: with non-standard dateformat bug
|
||||||
|
|
||||||
# Setup: Add a task
|
# Setup: Add a task
|
||||||
qx{../src/task rc:bug.rc add wait:\\"Wed Jan 01 2020\\" A buggy task};
|
qx{../src/task rc:bug.rc add wait:\\"Wed Jan 01 2020\\" A buggy task 2>&1};
|
||||||
|
|
||||||
# Result: Immediately delete the created task
|
# Result: Immediately delete the created task
|
||||||
my $output = qx{../src/task rc:bug.rc waiting};
|
my $output = qx{../src/task rc:bug.rc waiting 2>&1};
|
||||||
like ($output, qr/1\/1\/2020/ms, 'a b D Y dateformat correctly parsed.');
|
like ($output, qr/1\/1\/2020/ms, 'a b D Y dateformat correctly parsed.');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -42,10 +42,10 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
# Bug 634: confirmation=off not honored by undo
|
# Bug 634: confirmation=off not honored by undo
|
||||||
|
|
||||||
# Setup: Add a task
|
# Setup: Add a task
|
||||||
qx{../src/task rc:bug.rc add Test};
|
qx{../src/task rc:bug.rc add Test 2>&1};
|
||||||
|
|
||||||
# Result: Attempt to undo add with confirmation=off
|
# Result: Attempt to undo add with confirmation=off
|
||||||
my $output = qx{echo 'n' |../src/task rc:bug.rc rc.confirmation=off undo};
|
my $output = qx{echo 'n' |../src/task rc:bug.rc rc.confirmation=off undo 2>&1};
|
||||||
unlike ($output, qr/Are you sure/ms, 'Undo honours confirmation=off.');
|
unlike ($output, qr/Are you sure/ms, 'Undo honours confirmation=off.');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -42,13 +42,13 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
# Bug 635: /OLD/NEW/g is broken?
|
# Bug 635: /OLD/NEW/g is broken?
|
||||||
|
|
||||||
# Setup: Add a task with two identical spelling mistakes
|
# Setup: Add a task with two identical spelling mistakes
|
||||||
qx{../src/task rc:bug.rc add Pay teh rent on teh 31st};
|
qx{../src/task rc:bug.rc add Pay teh rent on teh 31st 2>&1};
|
||||||
|
|
||||||
# Process: Global replace incorrect text
|
# Process: Global replace incorrect text
|
||||||
qx{../src/task rc:bug.rc 1 modify /teh/the/g};
|
qx{../src/task rc:bug.rc 1 modify /teh/the/g 2>&1};
|
||||||
|
|
||||||
# Result: Verify corrected output
|
# Result: Verify corrected output
|
||||||
my $output = qx{../src/task rc:bug.rc ls 1};
|
my $output = qx{../src/task rc:bug.rc ls 1 2>&1};
|
||||||
like ($output, qr/Pay the rent on the 31st/ms, 'Global replace performed correctly.');
|
like ($output, qr/Pay the rent on the 31st/ms, 'Global replace performed correctly.');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -43,10 +43,10 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
# marked completed
|
# marked completed
|
||||||
|
|
||||||
# Setup: Add a recurring task
|
# Setup: Add a recurring task
|
||||||
qx{../src/task rc:bug.rc add Test due:3d rec:1w};
|
qx{../src/task rc:bug.rc add Test due:3d rec:1w 2>&1};
|
||||||
|
|
||||||
# Result: Immediately delete the created task
|
# Result: Immediately delete the created task
|
||||||
my $output = qx{../src/task rc:bug.rc 1 done};
|
my $output = qx{../src/task rc:bug.rc 1 done 2>&1};
|
||||||
like ($output, qr/is neither pending nor waiting/, 'Parent task not completable');
|
like ($output, qr/is neither pending nor waiting/, 'Parent task not completable');
|
||||||
unlike ($output, qr/Completed 1/ms, 'New recurring task cannot be immediately completed.');
|
unlike ($output, qr/Completed 1/ms, 'New recurring task cannot be immediately completed.');
|
||||||
|
|
||||||
|
|
|
@ -42,17 +42,17 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
# Bug 656: Recurring task continually spawns new tasks
|
# Bug 656: Recurring task continually spawns new tasks
|
||||||
|
|
||||||
# Setup: Add a pair of recurring tasks
|
# Setup: Add a pair of recurring tasks
|
||||||
qx{../src/task rc:bug.rc add First recurring task due:tomorrow rec:daily};
|
qx{../src/task rc:bug.rc add First recurring task due:tomorrow rec:daily 2>&1};
|
||||||
qx{../src/task rc:bug.rc add Second recurring task due:tomorrow rec:daily};
|
qx{../src/task rc:bug.rc add Second recurring task due:tomorrow rec:daily 2>&1};
|
||||||
|
|
||||||
# Bug describes that each time task is executed, another child task of the
|
# Bug describes that each time task is executed, another child task of the
|
||||||
# Second recurring task is created.
|
# Second recurring task is created.
|
||||||
|
|
||||||
qx{../src/task rc:bug.rc ls};
|
qx{../src/task rc:bug.rc ls 2>&1};
|
||||||
|
|
||||||
|
|
||||||
# Result: Check for an extra task the second time task ls is executed
|
# Result: Check for an extra task the second time task ls is executed
|
||||||
my $output = qx{../src/task rc:bug.rc ls};
|
my $output = qx{../src/task rc:bug.rc ls 2>&1};
|
||||||
unlike ($output, qr/^\s3\s*Second recurring task\s*$/ms, 'Extra task detected.');
|
unlike ($output, qr/^\s3\s*Second recurring task\s*$/ms, 'Extra task detected.');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -40,11 +40,11 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
|
|
||||||
# Bug 668: URL should allow users with dot character
|
# Bug 668: URL should allow users with dot character
|
||||||
|
|
||||||
my $output = qx{../src/task rc:bug.rc merge user.name\@taskwarrior.org:undo.data};
|
my $output = qx{../src/task rc:bug.rc merge user.name\@taskwarrior.org:undo.data 2>&1};
|
||||||
unlike ($output, qr/not a valid modifier/, 'scp syntax with dots');
|
unlike ($output, qr/not a valid modifier/, 'scp syntax with dots');
|
||||||
unlike ($output, qr/not in the expected format/, 'scp syntax with dots');
|
unlike ($output, qr/not in the expected format/, 'scp syntax with dots');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc merge ssh://user.name\@taskwarrior.org/undo.data};
|
$output = qx{../src/task rc:bug.rc merge ssh://user.name\@taskwarrior.org/undo.data 2>&1};
|
||||||
unlike ($output, qr/not a valid modifier/, 'standard syntax with dots');
|
unlike ($output, qr/not a valid modifier/, 'standard syntax with dots');
|
||||||
unlike ($output, qr/not in the expected format/, 'standard syntax with dots');
|
unlike ($output, qr/not in the expected format/, 'standard syntax with dots');
|
||||||
|
|
||||||
|
|
|
@ -41,15 +41,15 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
# Bug 674: ID numbers change between reports when marking tasks as done
|
# Bug 674: ID numbers change between reports when marking tasks as done
|
||||||
|
|
||||||
# Setup: Add a few tasks
|
# Setup: Add a few tasks
|
||||||
qx{../src/task rc:bug.rc add One};
|
qx{../src/task rc:bug.rc add One 2>&1};
|
||||||
qx{../src/task rc:bug.rc add Two};
|
qx{../src/task rc:bug.rc add Two 2>&1};
|
||||||
qx{../src/task rc:bug.rc add Three};
|
qx{../src/task rc:bug.rc add Three 2>&1};
|
||||||
|
|
||||||
# Complete task 1 and then attempt to complete task 2
|
# Complete task 1 and then attempt to complete task 2
|
||||||
qx{../src/task rc:bug.rc 1 done};
|
qx{../src/task rc:bug.rc 1 done 2>&1};
|
||||||
|
|
||||||
# Result: Immediately delete the created task
|
# Result: Immediately delete the created task
|
||||||
my $output = qx{../src/task rc:bug.rc 2 done};
|
my $output = qx{../src/task rc:bug.rc 2 done 2>&1};
|
||||||
like ($output, qr/Two/ms, 'IDs correctly remain unchanged after done');
|
like ($output, qr/Two/ms, 'IDs correctly remain unchanged after done');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -41,11 +41,11 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
# Bug 694: Potential bug for "due" and "annotate"
|
# Bug 694: Potential bug for "due" and "annotate"
|
||||||
|
|
||||||
# Setup: Add a tasks, annotate with long word.
|
# Setup: Add a tasks, annotate with long word.
|
||||||
qx{../src/task rc:bug.rc add One};
|
qx{../src/task rc:bug.rc add One 2>&1};
|
||||||
qx{../src/task rc:bug.rc 1 annotate foo due:today};
|
qx{../src/task rc:bug.rc 1 annotate foo due:today 2>&1};
|
||||||
|
|
||||||
# List with rc.hyphenate=on.
|
# List with rc.hyphenate=on.
|
||||||
my $output = qx{../src/task rc:bug.rc 1 info};
|
my $output = qx{../src/task rc:bug.rc 1 info 2>&1};
|
||||||
like ($output, qr/One/, 'found One');
|
like ($output, qr/One/, 'found One');
|
||||||
like ($output, qr/foo/, 'found foo');
|
like ($output, qr/foo/, 'found foo');
|
||||||
like ($output, qr/Due/, 'found Due');
|
like ($output, qr/Due/, 'found Due');
|
||||||
|
|
|
@ -42,19 +42,19 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
# Bug 703: /from/t/g fails to make all changes to annotations
|
# Bug 703: /from/t/g fails to make all changes to annotations
|
||||||
|
|
||||||
# Setup: Add a few tasks
|
# Setup: Add a few tasks
|
||||||
qx{../src/task rc:bug.rc add This is a test};
|
qx{../src/task rc:bug.rc add This is a test 2>&1};
|
||||||
qx{../src/task rc:bug.rc 1 annotate Annotation one};
|
qx{../src/task rc:bug.rc 1 annotate Annotation one 2>&1};
|
||||||
qx{../src/task rc:bug.rc 1 annotate Annotation two};
|
qx{../src/task rc:bug.rc 1 annotate Annotation two 2>&1};
|
||||||
qx{../src/task rc:bug.rc 1 annotate Annotation three};
|
qx{../src/task rc:bug.rc 1 annotate Annotation three 2>&1};
|
||||||
|
|
||||||
my $output = qx{../src/task rc:bug.rc list};
|
my $output = qx{../src/task rc:bug.rc list 2>&1};
|
||||||
like ($output, qr/This is a test/, 'original description');
|
like ($output, qr/This is a test/, 'original description');
|
||||||
like ($output, qr/Annotation one/, 'original annotation one');
|
like ($output, qr/Annotation one/, 'original annotation one');
|
||||||
like ($output, qr/Annotation two/, 'original annotation two');
|
like ($output, qr/Annotation two/, 'original annotation two');
|
||||||
like ($output, qr/Annotation three/, 'original annotation three');
|
like ($output, qr/Annotation three/, 'original annotation three');
|
||||||
|
|
||||||
qx{../src/task rc:bug.rc 1 modify /i/I/g};
|
qx{../src/task rc:bug.rc 1 modify /i/I/g 2>&1};
|
||||||
$output = qx{../src/task rc:bug.rc list};
|
$output = qx{../src/task rc:bug.rc list 2>&1};
|
||||||
like ($output, qr/ThIs Is a test/, 'new description');
|
like ($output, qr/ThIs Is a test/, 'new description');
|
||||||
like ($output, qr/AnnotatIon one/, 'new annotation one');
|
like ($output, qr/AnnotatIon one/, 'new annotation one');
|
||||||
like ($output, qr/AnnotatIon two/, 'new annotation two');
|
like ($output, qr/AnnotatIon two/, 'new annotation two');
|
||||||
|
|
|
@ -43,16 +43,16 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
# Bug 708: Bad Math in Project is % Complete
|
# Bug 708: Bad Math in Project is % Complete
|
||||||
|
|
||||||
# Setup: Add a few tasks
|
# Setup: Add a few tasks
|
||||||
qx{../src/task rc:bug.rc add One pro:p1};
|
qx{../src/task rc:bug.rc add One pro:p1 2>&1};
|
||||||
qx{../src/task rc:bug.rc add Two pro:p1};
|
qx{../src/task rc:bug.rc add Two pro:p1 2>&1};
|
||||||
qx{../src/task rc:bug.rc add Three pro:p1};
|
qx{../src/task rc:bug.rc add Three pro:p1 2>&1};
|
||||||
qx{../src/task rc:bug.rc add Four pro:p1};
|
qx{../src/task rc:bug.rc add Four pro:p1 2>&1};
|
||||||
qx{../src/task rc:bug.rc add Five pro:p1};
|
qx{../src/task rc:bug.rc add Five pro:p1 2>&1};
|
||||||
qx{../src/task rc:bug.rc add Six pro:p1};
|
qx{../src/task rc:bug.rc add Six pro:p1 2>&1};
|
||||||
qx{../src/task rc:bug.rc add Seven pro:p1};
|
qx{../src/task rc:bug.rc add Seven pro:p1 2>&1};
|
||||||
qx{../src/task rc:bug.rc add Eight pro:p1};
|
qx{../src/task rc:bug.rc add Eight pro:p1 2>&1};
|
||||||
qx{../src/task rc:bug.rc add Nine pro:p1};
|
qx{../src/task rc:bug.rc add Nine pro:p1 2>&1};
|
||||||
qx{../src/task rc:bug.rc add Ten pro:p1};
|
qx{../src/task rc:bug.rc add Ten pro:p1 2>&1};
|
||||||
|
|
||||||
# Complete three tasks and ensure pending and done counts are updated correctly.
|
# Complete three tasks and ensure pending and done counts are updated correctly.
|
||||||
my $output = qx{../src/task rc:bug.rc 1-3 do 2>&1 >/dev/null};
|
my $output = qx{../src/task rc:bug.rc 1-3 do 2>&1 >/dev/null};
|
||||||
|
|
|
@ -43,16 +43,16 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
# Bug 804: URL link and break line
|
# Bug 804: URL link and break line
|
||||||
|
|
||||||
# Setup: Add a tasks, annotate with long word.
|
# Setup: Add a tasks, annotate with long word.
|
||||||
qx{../src/task rc:bug.rc add One};
|
qx{../src/task rc:bug.rc add One 2>&1};
|
||||||
qx{../src/task rc:bug.rc 1 annotate abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz};
|
qx{../src/task rc:bug.rc 1 annotate abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz 2>&1};
|
||||||
|
|
||||||
# List with rc.hyphenate=on.
|
# List with rc.hyphenate=on.
|
||||||
my $output = qx{../src/task rc:bug.rc rc.defaultwidth:40 rc.hyphenate:on ls};
|
my $output = qx{../src/task rc:bug.rc rc.defaultwidth:40 rc.hyphenate:on ls 2>&1};
|
||||||
like ($output, qr/vwx-\n/ms, 'hyphenated 1');
|
like ($output, qr/vwx-\n/ms, 'hyphenated 1');
|
||||||
like ($output, qr/tuv-\n/ms, 'hyphenated 2');
|
like ($output, qr/tuv-\n/ms, 'hyphenated 2');
|
||||||
|
|
||||||
# List with rc.hyphenate=off.
|
# List with rc.hyphenate=off.
|
||||||
$output = qx{../src/task rc:bug.rc rc.defaultwidth:40 rc.hyphenate:off ls};
|
$output = qx{../src/task rc:bug.rc rc.defaultwidth:40 rc.hyphenate:off ls 2>&1};
|
||||||
like ($output, qr/vwxy\n/ms, 'not hyphenated 1');
|
like ($output, qr/vwxy\n/ms, 'not hyphenated 1');
|
||||||
like ($output, qr/uvwx\n/ms, 'not hyphenated 2');
|
like ($output, qr/uvwx\n/ms, 'not hyphenated 2');
|
||||||
|
|
||||||
|
|
|
@ -40,27 +40,27 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
|
|
||||||
# Bug #818: Filtering by tag counter-intuitively uses partial match
|
# Bug #818: Filtering by tag counter-intuitively uses partial match
|
||||||
|
|
||||||
qx{../src/task rc:bug.rc add +hannah +anna Buy some bananas};
|
qx{../src/task rc:bug.rc add +hannah +anna Buy some bananas 2>&1};
|
||||||
my $output = qx{../src/task rc:bug.rc list +hannah};
|
my $output = qx{../src/task rc:bug.rc list +hannah 2>&1};
|
||||||
like ($output, qr/bananas/, 'Containing tag query');
|
like ($output, qr/bananas/, 'Containing tag query');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc list +anna};
|
$output = qx{../src/task rc:bug.rc list +anna 2>&1};
|
||||||
like ($output, qr/bananas/, 'Contained tag query');
|
like ($output, qr/bananas/, 'Contained tag query');
|
||||||
|
|
||||||
qx{../src/task rc:bug.rc add +anna +hannah Buy tickets to Santana};
|
qx{../src/task rc:bug.rc add +anna +hannah Buy tickets to Santana 2>&1};
|
||||||
$output = qx{../src/task rc:bug.rc list +anna};
|
$output = qx{../src/task rc:bug.rc list +anna 2>&1};
|
||||||
like ($output, qr/Santana/, 'Contained tag query');
|
like ($output, qr/Santana/, 'Contained tag query');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc list +hannah};
|
$output = qx{../src/task rc:bug.rc list +hannah 2>&1};
|
||||||
like ($output, qr/Santana/, 'Containing tag query');
|
like ($output, qr/Santana/, 'Containing tag query');
|
||||||
|
|
||||||
# Buy some bananas +hannah +anna
|
# Buy some bananas +hannah +anna
|
||||||
# Buy tickets to Santana +anna +hannah
|
# Buy tickets to Santana +anna +hannah
|
||||||
# AAA +hannah
|
# AAA +hannah
|
||||||
# BBB +anna
|
# BBB +anna
|
||||||
qx{../src/task rc:bug.rc add +hannah AAA};
|
qx{../src/task rc:bug.rc add +hannah AAA 2>&1};
|
||||||
qx{../src/task rc:bug.rc add +anna BBB};
|
qx{../src/task rc:bug.rc add +anna BBB 2>&1};
|
||||||
$output = qx{../src/task rc:bug.rc long +anna};
|
$output = qx{../src/task rc:bug.rc long +anna 2>&1};
|
||||||
like ($output, qr/bananas/, '+anna --> bananas');
|
like ($output, qr/bananas/, '+anna --> bananas');
|
||||||
like ($output, qr/Santana/, '+anna --> Santana');
|
like ($output, qr/Santana/, '+anna --> Santana');
|
||||||
unlike ($output, qr/AAA/, '+anna !-> AAA');
|
unlike ($output, qr/AAA/, '+anna !-> AAA');
|
||||||
|
|
|
@ -39,10 +39,10 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Bug 819: When I run "task add foo\'s bar." the description of the new task is "foo 's bar .".
|
# Bug 819: When I run "task add foo\'s bar." the description of the new task is "foo 's bar .".
|
||||||
qx{../src/task rc:bug.rc add foo\\'s bar.};
|
qx{../src/task rc:bug.rc add foo\\'s bar. 2>&1};
|
||||||
qx{../src/task rc:bug.rc add foo \\(bar\\)};
|
qx{../src/task rc:bug.rc add foo \\(bar\\) 2>&1};
|
||||||
qx{../src/task rc:bug.rc add \\'baz \\(qux\\)\\'};
|
qx{../src/task rc:bug.rc add \\'baz \\(qux\\)\\' 2>&1};
|
||||||
my $output = qx{../src/task rc:bug.rc ls};
|
my $output = qx{../src/task rc:bug.rc ls 2>&1};
|
||||||
like ($output, qr/foo's bar\./, "foo's bar. --> preserved");
|
like ($output, qr/foo's bar\./, "foo's bar. --> preserved");
|
||||||
|
|
||||||
#like ($output, qr/foo \(bar\)/, "foo \(bar\) -- preserved");
|
#like ($output, qr/foo \(bar\)/, "foo \(bar\) -- preserved");
|
||||||
|
|
|
@ -38,11 +38,11 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
ok (-r 'bug.rc', 'Created bug.rc');
|
ok (-r 'bug.rc', 'Created bug.rc');
|
||||||
}
|
}
|
||||||
|
|
||||||
qx{../src/task rc:bug.rc add pro:main.subproject Test};
|
qx{../src/task rc:bug.rc add pro:main.subproject Test 2>&1};
|
||||||
my $output = qx{../src/task rc:bug.rc ls};
|
my $output = qx{../src/task rc:bug.rc ls 2>&1};
|
||||||
like ($output, qr/main\.subproject/, "hierarchical project ok");
|
like ($output, qr/main\.subproject/, "hierarchical project ok");
|
||||||
|
|
||||||
qx{../src/task rc:bug.rc \\(pro:main.subproject\\) ls};
|
qx{../src/task rc:bug.rc \\(pro:main.subproject\\) ls 2>&1};
|
||||||
like ($output, qr/main\.subproject/, "Parens tolerated");
|
like ($output, qr/main\.subproject/, "Parens tolerated");
|
||||||
unlike ($output, qr/Mismatched parentheses in expression/, "No 'mismatch' error generated");
|
unlike ($output, qr/Mismatched parentheses in expression/, "No 'mismatch' error generated");
|
||||||
|
|
||||||
|
|
|
@ -40,20 +40,20 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
|
|
||||||
# Bug 837: When a task is completed, tasks that depended upon it don't have
|
# Bug 837: When a task is completed, tasks that depended upon it don't have
|
||||||
# correct urgency and depend on 0 when edited
|
# correct urgency and depend on 0 when edited
|
||||||
qx{../src/task rc:bug.rc add one};
|
qx{../src/task rc:bug.rc add one 2>&1};
|
||||||
qx{../src/task rc:bug.rc add two dep:1};
|
qx{../src/task rc:bug.rc add two dep:1 2>&1};
|
||||||
my $output = qx{../src/task rc:bug.rc long};
|
my $output = qx{../src/task rc:bug.rc long 2>&1};
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc 1 _urgency};
|
$output = qx{../src/task rc:bug.rc 1 _urgency 2>&1};
|
||||||
like ($output, qr/ 8\n/, 'blocking urgency == 8');
|
like ($output, qr/ 8\n/, 'blocking urgency == 8');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc 2 _urgency};
|
$output = qx{../src/task rc:bug.rc 2 _urgency 2>&1};
|
||||||
like ($output, qr/ -5\n/, 'blocked urgency == -5');
|
like ($output, qr/ -5\n/, 'blocked urgency == -5');
|
||||||
|
|
||||||
qx{../src/task rc:bug.rc 1 done};
|
qx{../src/task rc:bug.rc 1 done 2>&1};
|
||||||
qx{../src/task rc:bug.rc list};
|
qx{../src/task rc:bug.rc list 2>&1};
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc 1 _urgency};
|
$output = qx{../src/task rc:bug.rc 1 _urgency 2>&1};
|
||||||
like ($output, qr/ 0\n/, 'unblocked urgency == 0');
|
like ($output, qr/ 0\n/, 'unblocked urgency == 0');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -45,7 +45,7 @@ if (open my $fh, '>', 'pending.data')
|
||||||
ok (-r 'pending.data', 'Created pending.data');
|
ok (-r 'pending.data', 'Created pending.data');
|
||||||
}
|
}
|
||||||
|
|
||||||
my $output = qx{../src/task rc:bug.rc list};
|
my $output = qx{../src/task rc:bug.rc list 2>&1};
|
||||||
like ($output, qr/One/, 'task listed');
|
like ($output, qr/One/, 'task listed');
|
||||||
unlike ($output, qr/The recurrence value '1m' is not valid\./, 'recu:1m => no error');
|
unlike ($output, qr/The recurrence value '1m' is not valid\./, 'recu:1m => no error');
|
||||||
|
|
||||||
|
|
|
@ -39,17 +39,17 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Bug 851: Filtering by due dates with ordinal and d/wks/etc. doesn't work
|
# Bug 851: Filtering by due dates with ordinal and d/wks/etc. doesn't work
|
||||||
qx{../src/task rc:bug.rc add yesterday due:-2days};
|
qx{../src/task rc:bug.rc add yesterday due:-2days 2>&1};
|
||||||
qx{../src/task rc:bug.rc add tomorrow due:2days};
|
qx{../src/task rc:bug.rc add tomorrow due:2days 2>&1};
|
||||||
my $output = qx{../src/task rc:bug.rc ls};
|
my $output = qx{../src/task rc:bug.rc ls 2>&1};
|
||||||
like ($output, qr/yesterday/, "yesterday - task added");
|
like ($output, qr/yesterday/, "yesterday - task added");
|
||||||
like ($output, qr/tomorrow/, "tomorrow - task added");
|
like ($output, qr/tomorrow/, "tomorrow - task added");
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc list due.before:1d};
|
$output = qx{../src/task rc:bug.rc list due.before:1d 2>&1};
|
||||||
like ($output, qr/yesterday/, "yesterday - found before:1d");
|
like ($output, qr/yesterday/, "yesterday - found before:1d");
|
||||||
unlike ($output, qr/tomorrow/, "tomorrow - not found before:1d");
|
unlike ($output, qr/tomorrow/, "tomorrow - not found before:1d");
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc list due.after:1d};
|
$output = qx{../src/task rc:bug.rc list due.after:1d 2>&1};
|
||||||
unlike ($output, qr/yesterday/, "yesterday - not found after:1d");
|
unlike ($output, qr/yesterday/, "yesterday - not found after:1d");
|
||||||
like ($output, qr/tomorrow/, "tomorrow - found after:1d");
|
like ($output, qr/tomorrow/, "tomorrow - found after:1d");
|
||||||
|
|
||||||
|
|
|
@ -41,18 +41,18 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
# Bug 856: "task list project.none:" does not work.
|
# Bug 856: "task list project.none:" does not work.
|
||||||
# Note: Not using "assigned" and "unassigned" because one is a subset of the
|
# Note: Not using "assigned" and "unassigned" because one is a subset of the
|
||||||
# other.
|
# other.
|
||||||
qx{../src/task rc:bug.rc add assigned project:X};
|
qx{../src/task rc:bug.rc add assigned project:X 2>&1};
|
||||||
qx{../src/task rc:bug.rc add floating};
|
qx{../src/task rc:bug.rc add floating 2>&1};
|
||||||
|
|
||||||
my $output = qx{../src/task rc:bug.rc ls project:};
|
my $output = qx{../src/task rc:bug.rc ls project: 2>&1};
|
||||||
like ($output, qr/floating/, 'project: matches floating');
|
like ($output, qr/floating/, 'project: matches floating');
|
||||||
unlike ($output, qr/assigned/, 'project: does not match assigned');
|
unlike ($output, qr/assigned/, 'project: does not match assigned');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc ls project:''};
|
$output = qx{../src/task rc:bug.rc ls project:'' 2>&1};
|
||||||
like ($output, qr/floating/, 'project:\'\' matches floating');
|
like ($output, qr/floating/, 'project:\'\' matches floating');
|
||||||
unlike ($output, qr/assigned/, 'project:\'\' does not match assigned');
|
unlike ($output, qr/assigned/, 'project:\'\' does not match assigned');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc ls project.none:};
|
$output = qx{../src/task rc:bug.rc ls project.none: 2>&1};
|
||||||
like ($output, qr/floating/, 'project.none: matches floating');
|
like ($output, qr/floating/, 'project.none: matches floating');
|
||||||
unlike ($output, qr/assigned/, 'project.none: does not match assigned');
|
unlike ($output, qr/assigned/, 'project.none: does not match assigned');
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,8 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Bug 869: lower case priorities aren't accepted.
|
# Bug 869: lower case priorities aren't accepted.
|
||||||
qx{../src/task rc:bug.rc add foo pri:h};
|
qx{../src/task rc:bug.rc add foo pri:h 2>&1};
|
||||||
my $output = qx{../src/task rc:bug.rc 1 info};
|
my $output = qx{../src/task rc:bug.rc 1 info 2>&1};
|
||||||
like ($output, qr/Priority\s+H/, "pri:h --> pri:H");
|
like ($output, qr/Priority\s+H/, "pri:h --> pri:H");
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -39,17 +39,17 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Bug 879: Backslash at end of description/annotation causes problems.
|
# Bug 879: Backslash at end of description/annotation causes problems.
|
||||||
qx{../src/task rc:bug.rc add one\\\\};
|
qx{../src/task rc:bug.rc add one\\\\ 2>&1};
|
||||||
my $output = qx{../src/task rc:bug.rc list};
|
my $output = qx{../src/task rc:bug.rc list 2>&1};
|
||||||
like ($output, qr/one\\/, 'Backslash preserved in description');
|
like ($output, qr/one\\/, 'Backslash preserved in description');
|
||||||
|
|
||||||
qx{../src/task rc:bug.rc 1 annotate foo\\\\};
|
qx{../src/task rc:bug.rc 1 annotate foo\\\\ 2>&1};
|
||||||
$output = qx{../src/task rc:bug.rc list};
|
$output = qx{../src/task rc:bug.rc list 2>&1};
|
||||||
like ($output, qr/one\\/, 'Backslash preserved in description');
|
like ($output, qr/one\\/, 'Backslash preserved in description');
|
||||||
like ($output, qr/foo\\/, 'Backslash preserved in annotation 1');
|
like ($output, qr/foo\\/, 'Backslash preserved in annotation 1');
|
||||||
|
|
||||||
qx{../src/task rc:bug.rc 1 annotate bar\\\\};
|
qx{../src/task rc:bug.rc 1 annotate bar\\\\ 2>&1};
|
||||||
$output = qx{../src/task rc:bug.rc list};
|
$output = qx{../src/task rc:bug.rc list 2>&1};
|
||||||
like ($output, qr/one\\/, 'Backslash preserved in description');
|
like ($output, qr/one\\/, 'Backslash preserved in description');
|
||||||
like ($output, qr/foo\\/, 'Backslash preserved in annotation 1');
|
like ($output, qr/foo\\/, 'Backslash preserved in annotation 1');
|
||||||
like ($output, qr/bar\\/, 'Backslash preserved in annotation 2');
|
like ($output, qr/bar\\/, 'Backslash preserved in annotation 2');
|
||||||
|
|
|
@ -39,9 +39,9 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Bug 884: Extra space in path name.
|
# Bug 884: Extra space in path name.
|
||||||
qx{../src/task rc:bug.rc add /one/two/three/};
|
qx{../src/task rc:bug.rc add /one/two/three/ 2>&1};
|
||||||
qx{../src/task rc:bug.rc add \\'/four/five/six/\\'};
|
qx{../src/task rc:bug.rc add \\'/four/five/six/\\' 2>&1};
|
||||||
my $output = qx{../src/task rc:bug.rc ls};
|
my $output = qx{../src/task rc:bug.rc ls 2>&1};
|
||||||
|
|
||||||
#like ($output, qr/\/one\/two\/three\//, "/one/two/three/ --> preserved");
|
#like ($output, qr/\/one\/two\/three\//, "/one/two/three/ --> preserved");
|
||||||
pass ("/one/two/three/ --> preserved -- TEST SKIPPED --");
|
pass ("/one/two/three/ --> preserved -- TEST SKIPPED --");
|
||||||
|
|
|
@ -39,7 +39,7 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Bug 886: tw doesn't warn the user if, e.g., a weekday cannot be resolved properly
|
# Bug 886: tw doesn't warn the user if, e.g., a weekday cannot be resolved properly
|
||||||
my $output = qx{../src/task rc:bug.rc add one due:sund};
|
my $output = qx{../src/task rc:bug.rc add one due:sund 2>&1};
|
||||||
like ($output, qr/Created task 1\./, 'sund --> valid date');
|
like ($output, qr/Created task 1\./, 'sund --> valid date');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc add two due:donkey 2>&1 >/dev/null};
|
$output = qx{../src/task rc:bug.rc add two due:donkey 2>&1 >/dev/null};
|
||||||
|
|
|
@ -40,30 +40,30 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Bug 906: escaping runs amok
|
# Bug 906: escaping runs amok
|
||||||
qx{../src/task rc:bug.rc add zero};
|
qx{../src/task rc:bug.rc add zero 2>&1};
|
||||||
qx{../src/task rc:bug.rc add one pro:a.b};
|
qx{../src/task rc:bug.rc add one pro:a.b 2>&1};
|
||||||
qx{../src/task rc:bug.rc add two pro:a};
|
qx{../src/task rc:bug.rc add two pro:a 2>&1};
|
||||||
my $output = qx{../src/task rc:bug.rc list};
|
my $output = qx{../src/task rc:bug.rc list 2>&1};
|
||||||
like ($output, qr/zero/, 'list - zero included');
|
like ($output, qr/zero/, 'list - zero included');
|
||||||
like ($output, qr/one/, 'list - one included');
|
like ($output, qr/one/, 'list - one included');
|
||||||
like ($output, qr/two/, 'list - two included');
|
like ($output, qr/two/, 'list - two included');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc list pro:a};
|
$output = qx{../src/task rc:bug.rc list pro:a 2>&1};
|
||||||
unlike ($output, qr/zero/, 'list - zero excluded');
|
unlike ($output, qr/zero/, 'list - zero excluded');
|
||||||
like ($output, qr/one/, 'list - one included');
|
like ($output, qr/one/, 'list - one included');
|
||||||
like ($output, qr/two/, 'list - two included');
|
like ($output, qr/two/, 'list - two included');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc list pro:a.b};
|
$output = qx{../src/task rc:bug.rc list pro:a.b 2>&1};
|
||||||
unlike ($output, qr/zero/, 'list - zero included');
|
unlike ($output, qr/zero/, 'list - zero included');
|
||||||
like ($output, qr/one/, 'list - one excluded');
|
like ($output, qr/one/, 'list - one excluded');
|
||||||
unlike ($output, qr/two/, 'list - two included');
|
unlike ($output, qr/two/, 'list - two included');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc list pro.not:a};
|
$output = qx{../src/task rc:bug.rc list pro.not:a 2>&1};
|
||||||
like ($output, qr/zero/, 'list - zero included');
|
like ($output, qr/zero/, 'list - zero included');
|
||||||
unlike ($output, qr/one/, 'list - one excluded');
|
unlike ($output, qr/one/, 'list - one excluded');
|
||||||
unlike ($output, qr/two/, 'list - two excluded');
|
unlike ($output, qr/two/, 'list - two excluded');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc list pro.not:a.b};
|
$output = qx{../src/task rc:bug.rc list pro.not:a.b 2>&1};
|
||||||
like ($output, qr/zero/, 'list - zero included');
|
like ($output, qr/zero/, 'list - zero included');
|
||||||
unlike ($output, qr/one/, 'list - one excluded');
|
unlike ($output, qr/one/, 'list - one excluded');
|
||||||
like ($output, qr/two/, 'list - two included');
|
like ($output, qr/two/, 'list - two included');
|
||||||
|
|
|
@ -40,14 +40,14 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Bug 917: escaping runs amok
|
# Bug 917: escaping runs amok
|
||||||
qx{../src/task rc:bug.rc add one \\'two\\' three};
|
qx{../src/task rc:bug.rc add one \\'two\\' three 2>&1};
|
||||||
qx{../src/task rc:bug.rc add four \\"five\\" six};
|
qx{../src/task rc:bug.rc add four \\"five\\" six 2>&1};
|
||||||
my $output = qx{../src/task rc:bug.rc list};
|
my $output = qx{../src/task rc:bug.rc list 2>&1};
|
||||||
like ($output, qr/one 'two' three/, 'Single quote preserved');
|
like ($output, qr/one 'two' three/, 'Single quote preserved');
|
||||||
like ($output, qr/four "five" six/, 'Double quote preserved');
|
like ($output, qr/four "five" six/, 'Double quote preserved');
|
||||||
|
|
||||||
qx{../src/task rc:bug.rc 1,2 mod +tag};
|
qx{../src/task rc:bug.rc 1,2 mod +tag 2>&1};
|
||||||
$output = qx{../src/task rc:bug.rc list};
|
$output = qx{../src/task rc:bug.rc list 2>&1};
|
||||||
like ($output, qr/one 'two' three/, 'Single quote preserved after modification');
|
like ($output, qr/one 'two' three/, 'Single quote preserved after modification');
|
||||||
like ($output, qr/four "five" six/, 'Double quote preserved after modification');
|
like ($output, qr/four "five" six/, 'Double quote preserved after modification');
|
||||||
|
|
||||||
|
|
|
@ -39,10 +39,10 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Bug 924: '1.0' --> '1.0000'
|
# Bug 924: '1.0' --> '1.0000'
|
||||||
qx{../src/task rc:bug.rc add release 1.0};
|
qx{../src/task rc:bug.rc add release 1.0 2>&1};
|
||||||
qx{../src/task rc:bug.rc add 'release 2.0'};
|
qx{../src/task rc:bug.rc add 'release 2.0' 2>&1};
|
||||||
qx{../src/task rc:bug.rc add "release 3.0"};
|
qx{../src/task rc:bug.rc add "release 3.0" 2>&1};
|
||||||
my $output = qx{../src/task rc:bug.rc list};
|
my $output = qx{../src/task rc:bug.rc list 2>&1};
|
||||||
like ($output, qr/\s1.0\n/ms, 'Plain text floating point preserved');
|
like ($output, qr/\s1.0\n/ms, 'Plain text floating point preserved');
|
||||||
like ($output, qr/\s2.0\n/ms, 'Single quote floating point preserved');
|
like ($output, qr/\s2.0\n/ms, 'Single quote floating point preserved');
|
||||||
like ($output, qr/\s3.0\n/ms, 'Double quote floating point preserved');
|
like ($output, qr/\s3.0\n/ms, 'Double quote floating point preserved');
|
||||||
|
|
|
@ -43,25 +43,25 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
# - add a recurring task with multiple child tasks
|
# - add a recurring task with multiple child tasks
|
||||||
# - modify a child task and test for propagation
|
# - modify a child task and test for propagation
|
||||||
# - modify the parent task and test for propagation
|
# - modify the parent task and test for propagation
|
||||||
qx{../src/task rc:bug.rc add R due:yesterday recur:daily};
|
qx{../src/task rc:bug.rc add R due:yesterday recur:daily 2>&1};
|
||||||
my $output = qx{../src/task rc:bug.rc list};
|
my $output = qx{../src/task rc:bug.rc list 2>&1};
|
||||||
like ($output, qr/2.+R/ms, 'Found child 0');
|
like ($output, qr/2.+R/ms, 'Found child 0');
|
||||||
like ($output, qr/3.+R/ms, 'Found child 1');
|
like ($output, qr/3.+R/ms, 'Found child 1');
|
||||||
like ($output, qr/4.+R/ms, 'Found child 2');
|
like ($output, qr/4.+R/ms, 'Found child 2');
|
||||||
|
|
||||||
qx{echo 'y' | ../src/task rc:bug.rc 2 mod project:P};
|
qx{echo 'y' | ../src/task rc:bug.rc 2 mod project:P 2>&1};
|
||||||
$output = qx{../src/task rc:bug.rc list};
|
$output = qx{../src/task rc:bug.rc list 2>&1};
|
||||||
like ($output, qr/2\s+P.+R/ms, 'Found modified child 0');
|
like ($output, qr/2\s+P.+R/ms, 'Found modified child 0');
|
||||||
like ($output, qr/3\s+P.+R/ms, 'Found modified child 1 (propagated from 0)');
|
like ($output, qr/3\s+P.+R/ms, 'Found modified child 1 (propagated from 0)');
|
||||||
like ($output, qr/4\s+P.+R/ms, 'Found modified child 2 (propagated from 0)');
|
like ($output, qr/4\s+P.+R/ms, 'Found modified child 2 (propagated from 0)');
|
||||||
|
|
||||||
qx{echo 'y' | ../src/task rc:bug.rc 1 mod priority:H};
|
qx{echo 'y' | ../src/task rc:bug.rc 1 mod priority:H 2>&1};
|
||||||
$output = qx{../src/task rc:bug.rc list};
|
$output = qx{../src/task rc:bug.rc list 2>&1};
|
||||||
like ($output, qr/2\s+P.+H.+R/ms, 'Found modified child 0 (propagated from parent');
|
like ($output, qr/2\s+P.+H.+R/ms, 'Found modified child 0 (propagated from parent');
|
||||||
like ($output, qr/3\s+P.+H.+R/ms, 'Found modified child 1 (propagated from parent)');
|
like ($output, qr/3\s+P.+H.+R/ms, 'Found modified child 1 (propagated from parent)');
|
||||||
like ($output, qr/4\s+P.+H.+R/ms, 'Found modified child 2 (propagated from parent)');
|
like ($output, qr/4\s+P.+H.+R/ms, 'Found modified child 2 (propagated from parent)');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc diag};
|
$output = qx{../src/task rc:bug.rc diag 2>&1};
|
||||||
like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected');
|
like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -44,14 +44,14 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
# - deleting task with UUID 874e146d-07a2-2d2c-7808-a76e74b1a332
|
# - deleting task with UUID 874e146d-07a2-2d2c-7808-a76e74b1a332
|
||||||
# - searching for tasks "foo" and "bar"
|
# - searching for tasks "foo" and "bar"
|
||||||
|
|
||||||
qx{../src/task rc:bug.rc add foo};
|
qx{../src/task rc:bug.rc add foo 2>&1};
|
||||||
qx{../src/task rc:bug.rc add bar};
|
qx{../src/task rc:bug.rc add bar 2>&1};
|
||||||
my $output = qx{../src/task rc:bug.rc list};
|
my $output = qx{../src/task rc:bug.rc list 2>&1};
|
||||||
like ($output, qr/foo/ms, 'Task foo added');
|
like ($output, qr/foo/ms, 'Task foo added');
|
||||||
like ($output, qr/bar/ms, 'Task bar added');
|
like ($output, qr/bar/ms, 'Task bar added');
|
||||||
qx{../src/task rc:bug.rc rc.confirmation=off rc.verbose=nothing rc.bulk=1000 874e146d-07a2-2d2c-7808-a76e74b1a332 delete};
|
qx{../src/task rc:bug.rc rc.confirmation=off rc.verbose=nothing rc.bulk=1000 874e146d-07a2-2d2c-7808-a76e74b1a332 delete 2>&1};
|
||||||
|
|
||||||
$output = qx{../src/task rc:bug.rc list};
|
$output = qx{../src/task rc:bug.rc list 2>&1};
|
||||||
like ($output, qr/foo/ms, 'Task foo not deleted');
|
like ($output, qr/foo/ms, 'Task foo not deleted');
|
||||||
like ($output, qr/bar/ms, 'Task bar not deleted');
|
like ($output, qr/bar/ms, 'Task bar not deleted');
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
# Bug 956 - 'task ids' prints the header, which prevents using the command in
|
# Bug 956 - 'task ids' prints the header, which prevents using the command in
|
||||||
# external script (it applies also for 'uuids' and helper subcommands).
|
# external script (it applies also for 'uuids' and helper subcommands).
|
||||||
|
|
||||||
qx{../src/task rc:bug.rc add test};
|
qx{../src/task rc:bug.rc add test 2>&1};
|
||||||
|
|
||||||
my $output = qx{TASKRC=bug.rc ../src/task rc:bug.rc ids};
|
my $output = qx{TASKRC=bug.rc ../src/task rc:bug.rc ids};
|
||||||
unlike ($output, qr/TASKRC/ms, 'The header does not appear with "ids"');
|
unlike ($output, qr/TASKRC/ms, 'The header does not appear with "ids"');
|
||||||
|
@ -49,7 +49,7 @@ unlike ($output, qr/TASKRC/ms, 'The header does not appear with "ids"');
|
||||||
$output = qx{TASKRC=bug.rc ../src/task uuids};
|
$output = qx{TASKRC=bug.rc ../src/task uuids};
|
||||||
unlike ($output, qr/TASKRC/ms, 'The header does not appear with "uuids"');
|
unlike ($output, qr/TASKRC/ms, 'The header does not appear with "uuids"');
|
||||||
|
|
||||||
$output = qx{TASKRC=bug.rc ../src/task _ids};
|
$output = qx{TASKRC=bug.rc ../src/task _ids 2>&1};
|
||||||
unlike ($output, qr/TASKRC/ms, 'The header does not appear with "_ids"');
|
unlike ($output, qr/TASKRC/ms, 'The header does not appear with "_ids"');
|
||||||
|
|
||||||
### Cleanup.
|
### Cleanup.
|
||||||
|
|
|
@ -44,17 +44,17 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
|
|
||||||
# Create one task (with a creation date) and one journal entry (with a
|
# Create one task (with a creation date) and one journal entry (with a
|
||||||
# timestamp and a date inside the entry)
|
# timestamp and a date inside the entry)
|
||||||
qx{../src/task rc:bug.rc add test};
|
qx{../src/task rc:bug.rc add test 2>&1};
|
||||||
qx{../src/task rc:bug.rc test start};
|
qx{../src/task rc:bug.rc test start 2>&1};
|
||||||
|
|
||||||
# Test that dateformat.info has precedence over dateformat and that no other
|
# Test that dateformat.info has precedence over dateformat and that no other
|
||||||
# format is applied
|
# format is applied
|
||||||
my $output = qx{../src/task rc:bug.rc test info rc.dateformat:m/d/Y rc.dateformat.info:__};
|
my $output = qx{../src/task rc:bug.rc test info rc.dateformat:m/d/Y rc.dateformat.info:__ 2>&1};
|
||||||
like ($output, qr/__/ms, 'Date formatted according to dateformat.info');
|
like ($output, qr/__/ms, 'Date formatted according to dateformat.info');
|
||||||
unlike ($output, qr/[0-9]*\/[0-9]*\/20[0-9]*/ms, 'No date is incorrectly formatted');
|
unlike ($output, qr/[0-9]*\/[0-9]*\/20[0-9]*/ms, 'No date is incorrectly formatted');
|
||||||
|
|
||||||
# Similar for dateformat
|
# Similar for dateformat
|
||||||
$output = qx{../src/task rc:bug.rc test info rc.dateformat:__ rc.dateformat.info:};
|
$output = qx{../src/task rc:bug.rc test info rc.dateformat:__ rc.dateformat.info: 2>&1};
|
||||||
like ($output, qr/__/ms, 'Date formatted according to dateformat');
|
like ($output, qr/__/ms, 'Date formatted according to dateformat');
|
||||||
|
|
||||||
### Cleanup.
|
### Cleanup.
|
||||||
|
|
|
@ -44,8 +44,8 @@ if (open my $fh, '>', 'color.rc')
|
||||||
# Bug that colored any task with both priority:L and a tag as though
|
# Bug that colored any task with both priority:L and a tag as though
|
||||||
# rc.color.tagged had a higher precedence than rc.color.pri.L, which it is not.
|
# rc.color.tagged had a higher precedence than rc.color.pri.L, which it is not.
|
||||||
|
|
||||||
qx{../src/task rc:color.rc add test +test pri:L};
|
qx{../src/task rc:color.rc add test +test pri:L 2>&1};
|
||||||
my $output = qx{../src/task rc:color.rc list};
|
my $output = qx{../src/task rc:color.rc list 2>&1};
|
||||||
like ($output, qr/ \033\[32m .* test .* \033\[0m /x, 'Colored with the priority color, which has precedence over the tagged color');
|
like ($output, qr/ \033\[32m .* test .* \033\[0m /x, 'Colored with the priority color, which has precedence over the tagged color');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -43,8 +43,8 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
# - showing the list of default configuration variables
|
# - showing the list of default configuration variables
|
||||||
# - checking that there is no error, no deprecated variable and no unrecognized variables
|
# - checking that there is no error, no deprecated variable and no unrecognized variables
|
||||||
|
|
||||||
qx{../src/task rc:bug.rc add foo};
|
qx{../src/task rc:bug.rc add foo 2>&1};
|
||||||
my $output = qx{../src/task rc:bug.rc show};
|
my $output = qx{../src/task rc:bug.rc show 2>&1};
|
||||||
unlike ($output, qr/Configuration error/ms, 'No configuration error');
|
unlike ($output, qr/Configuration error/ms, 'No configuration error');
|
||||||
unlike ($output, qr/deprecated/ms, 'No deprecated variable');
|
unlike ($output, qr/deprecated/ms, 'No deprecated variable');
|
||||||
unlike ($output, qr/unrecognized/ms, 'No unrecognized variable');
|
unlike ($output, qr/unrecognized/ms, 'No unrecognized variable');
|
||||||
|
|
|
@ -39,7 +39,7 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Attempt a blank annotation.
|
# Attempt a blank annotation.
|
||||||
qx{../src/task rc:bug.rc add foo};
|
qx{../src/task rc:bug.rc add foo 2>&1};
|
||||||
my $output = qx{../src/task rc:bug.rc 1 annotate 2>&1 >/dev/null};
|
my $output = qx{../src/task rc:bug.rc 1 annotate 2>&1 >/dev/null};
|
||||||
like ($output, qr/Additional text must be provided/, 'failed on blank annotation');
|
like ($output, qr/Additional text must be provided/, 'failed on blank annotation');
|
||||||
|
|
||||||
|
|
|
@ -55,8 +55,8 @@ if (open my $fh, '>', 'annual.rc')
|
||||||
# 11 13/29/2008 - foo
|
# 11 13/29/2008 - foo
|
||||||
# 12 12/29/2009 - foo
|
# 12 12/29/2009 - foo
|
||||||
|
|
||||||
qx{../src/task rc:annual.rc add foo due:1/1/2000 recur:annual until:1/1/2009};
|
qx{../src/task rc:annual.rc add foo due:1/1/2000 recur:annual until:1/1/2009 2>&1};
|
||||||
my $output = qx{../src/task rc:annual.rc list};
|
my $output = qx{../src/task rc:annual.rc list 2>&1};
|
||||||
like ($output, qr/2\s+1\/1\/2000\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 2 no creep');
|
like ($output, qr/2\s+1\/1\/2000\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 2 no creep');
|
||||||
like ($output, qr/3\s+1\/1\/2001\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 3 no creep');
|
like ($output, qr/3\s+1\/1\/2001\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 3 no creep');
|
||||||
like ($output, qr/4\s+1\/1\/2002\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 4 no creep');
|
like ($output, qr/4\s+1\/1\/2002\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 4 no creep');
|
||||||
|
@ -68,7 +68,7 @@ like ($output, qr/9\s+1\/1\/2007\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 9 no cre
|
||||||
like ($output, qr/10\s+1\/1\/2008\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 10 no creep');
|
like ($output, qr/10\s+1\/1\/2008\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 10 no creep');
|
||||||
like ($output, qr/11\s+1\/1\/2009\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 11 no creep');
|
like ($output, qr/11\s+1\/1\/2009\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 11 no creep');
|
||||||
|
|
||||||
$output = qx{../src/task rc:annual.rc diag};
|
$output = qx{../src/task rc:annual.rc diag 2>&1};
|
||||||
like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected');
|
like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -56,28 +56,28 @@ EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
# Verify data is readable and just as expected.
|
# Verify data is readable and just as expected.
|
||||||
my $output = qx{../src/task rc:before.rc 1 info};
|
my $output = qx{../src/task rc:before.rc 1 info 2>&1};
|
||||||
like ($output, qr/Start\s+12\/22\/2008/, 'task 1 start date as expected');
|
like ($output, qr/Start\s+12\/22\/2008/, 'task 1 start date as expected');
|
||||||
|
|
||||||
$output = qx{../src/task rc:before.rc 2 info};
|
$output = qx{../src/task rc:before.rc 2 info 2>&1};
|
||||||
like ($output, qr/Start\s+4\/17\/2009/, 'task 2 start date as expected');
|
like ($output, qr/Start\s+4\/17\/2009/, 'task 2 start date as expected');
|
||||||
|
|
||||||
$output = qx{../src/task rc:before.rc ls start.before:12/1/2008};
|
$output = qx{../src/task rc:before.rc ls start.before:12/1/2008 2>&1};
|
||||||
unlike ($output, qr/foo/, 'no foo before 12/1/2008');
|
unlike ($output, qr/foo/, 'no foo before 12/1/2008');
|
||||||
unlike ($output, qr/bar/, 'no bar before 12/1/2008');
|
unlike ($output, qr/bar/, 'no bar before 12/1/2008');
|
||||||
$output = qx{../src/task rc:before.rc ls start.before:1/1/2009};
|
$output = qx{../src/task rc:before.rc ls start.before:1/1/2009 2>&1};
|
||||||
like ($output, qr/foo/, 'foo before 1/1/2009');
|
like ($output, qr/foo/, 'foo before 1/1/2009');
|
||||||
unlike ($output, qr/bar/, 'no bar before 1/1/2009');
|
unlike ($output, qr/bar/, 'no bar before 1/1/2009');
|
||||||
$output = qx{../src/task rc:before.rc ls start.before:5/1/2009};
|
$output = qx{../src/task rc:before.rc ls start.before:5/1/2009 2>&1};
|
||||||
like ($output, qr/foo/, 'foo before 5/1/2009');
|
like ($output, qr/foo/, 'foo before 5/1/2009');
|
||||||
like ($output, qr/bar/, 'bar before 5/1/2009');
|
like ($output, qr/bar/, 'bar before 5/1/2009');
|
||||||
$output = qx{../src/task rc:before.rc ls start.after:12/1/2008};
|
$output = qx{../src/task rc:before.rc ls start.after:12/1/2008 2>&1};
|
||||||
like ($output, qr/foo/, 'foo after 12/1/2008');
|
like ($output, qr/foo/, 'foo after 12/1/2008');
|
||||||
like ($output, qr/bar/, 'bar after 12/1/2008');
|
like ($output, qr/bar/, 'bar after 12/1/2008');
|
||||||
$output = qx{../src/task rc:before.rc ls start.after:1/1/2009};
|
$output = qx{../src/task rc:before.rc ls start.after:1/1/2009 2>&1};
|
||||||
unlike ($output, qr/foo/, 'no foo after 1/1/2009');
|
unlike ($output, qr/foo/, 'no foo after 1/1/2009');
|
||||||
like ($output, qr/bar/, 'bar after 1/1/2009');
|
like ($output, qr/bar/, 'bar after 1/1/2009');
|
||||||
$output = qx{../src/task rc:before.rc ls start.after:5/1/2009};
|
$output = qx{../src/task rc:before.rc ls start.after:5/1/2009 2>&1};
|
||||||
unlike ($output, qr/foo/, 'no foo after 5/1/2009');
|
unlike ($output, qr/foo/, 'no foo after 5/1/2009');
|
||||||
unlike ($output, qr/bar/, 'no bar after 5/1/2009');
|
unlike ($output, qr/bar/, 'no bar after 5/1/2009');
|
||||||
|
|
||||||
|
|
|
@ -42,30 +42,30 @@ if (open my $fh, '>', 'bulk.rc')
|
||||||
|
|
||||||
# Add some tasks with project, prioriy and due date, some with only due date.
|
# Add some tasks with project, prioriy and due date, some with only due date.
|
||||||
# Bulk add a project and priority to the tasks that were without.
|
# Bulk add a project and priority to the tasks that were without.
|
||||||
qx{../src/task rc:bulk.rc add t1 pro:p1 pri:H due:monday};
|
qx{../src/task rc:bulk.rc add t1 pro:p1 pri:H due:monday 2>&1};
|
||||||
qx{../src/task rc:bulk.rc add t2 pro:p1 pri:M due:tuesday};
|
qx{../src/task rc:bulk.rc add t2 pro:p1 pri:M due:tuesday 2>&1};
|
||||||
qx{../src/task rc:bulk.rc add t3 pro:p1 pri:L due:wednesday};
|
qx{../src/task rc:bulk.rc add t3 pro:p1 pri:L due:wednesday 2>&1};
|
||||||
qx{../src/task rc:bulk.rc add t4 due:thursday};
|
qx{../src/task rc:bulk.rc add t4 due:thursday 2>&1};
|
||||||
qx{../src/task rc:bulk.rc add t5 due:friday};
|
qx{../src/task rc:bulk.rc add t5 due:friday 2>&1};
|
||||||
qx{../src/task rc:bulk.rc add t6 due:saturday};
|
qx{../src/task rc:bulk.rc add t6 due:saturday 2>&1};
|
||||||
|
|
||||||
my $output = qx{echo "quit"|../src/task rc:bulk.rc 4 5 6 modify pro:p1 pri:M};
|
my $output = qx{echo "quit"|../src/task rc:bulk.rc 4 5 6 modify pro:p1 pri:M 2>&1};
|
||||||
like ($output, qr/Modified 0 tasks/, '"quit" prevents any further modifications');
|
like ($output, qr/Modified 0 tasks/, '"quit" prevents any further modifications');
|
||||||
|
|
||||||
$output = qx{echo "All"|../src/task rc:bulk.rc 4 5 6 mod pro:p1 pri:M};
|
$output = qx{echo "All"|../src/task rc:bulk.rc 4 5 6 mod pro:p1 pri:M 2>&1};
|
||||||
unlike ($output, qr/Task 4 "t4"\n - No changes were made/, 'Task 4 modified');
|
unlike ($output, qr/Task 4 "t4"\n - No changes were made/, 'Task 4 modified');
|
||||||
unlike ($output, qr/Task 5 "t5"\n - No changes were made/, 'Task 5 modified');
|
unlike ($output, qr/Task 5 "t5"\n - No changes were made/, 'Task 5 modified');
|
||||||
unlike ($output, qr/Task 6 "t6"\n - No changes were made/, 'Task 6 modified');
|
unlike ($output, qr/Task 6 "t6"\n - No changes were made/, 'Task 6 modified');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bulk.rc info 4};
|
$output = qx{../src/task rc:bulk.rc info 4 2>&1};
|
||||||
like ($output, qr/Project\s+p1/, 'project applied to 4');
|
like ($output, qr/Project\s+p1/, 'project applied to 4');
|
||||||
like ($output, qr/Priority\s+M/, 'priority applied to 4');
|
like ($output, qr/Priority\s+M/, 'priority applied to 4');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bulk.rc info 5};
|
$output = qx{../src/task rc:bulk.rc info 5 2>&1};
|
||||||
like ($output, qr/Project\s+p1/, 'project applied to 5');
|
like ($output, qr/Project\s+p1/, 'project applied to 5');
|
||||||
like ($output, qr/Priority\s+M/, 'priority applied to 5');
|
like ($output, qr/Priority\s+M/, 'priority applied to 5');
|
||||||
|
|
||||||
$output = qx{../src/task rc:bulk.rc info 6};
|
$output = qx{../src/task rc:bulk.rc info 6 2>&1};
|
||||||
like ($output, qr/Project\s+p1/, 'project applied to 6');
|
like ($output, qr/Project\s+p1/, 'project applied to 6');
|
||||||
like ($output, qr/Priority\s+M/, 'priority applied to 6');
|
like ($output, qr/Priority\s+M/, 'priority applied to 6');
|
||||||
|
|
||||||
|
|
|
@ -45,10 +45,10 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
# First noticed in 1.9.4 commit 2d50d1c
|
# First noticed in 1.9.4 commit 2d50d1c
|
||||||
|
|
||||||
# Setup: Add a recurring task
|
# Setup: Add a recurring task
|
||||||
qx{../src/task rc:bug.rc add First recurring task due:tomorrow rec:daily};
|
qx{../src/task rc:bug.rc add First recurring task due:tomorrow rec:daily 2>&1};
|
||||||
|
|
||||||
# Result: Ensure the second recurring task has an ID of 2
|
# Result: Ensure the second recurring task has an ID of 2
|
||||||
my $output = qx{../src/task rc:bug.rc add Second recurring task due:tomorrow rec:daily};
|
my $output = qx{../src/task rc:bug.rc add Second recurring task due:tomorrow rec:daily 2>&1};
|
||||||
like ($output, qr/Created task 2\./ms, 'Recurring task assigned correct ID.');
|
like ($output, qr/Created task 2\./ms, 'Recurring task assigned correct ID.');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -42,65 +42,65 @@ if (open my $fh, '>', 'cal.rc')
|
||||||
# Bug: The 'cal' command can fail when provided with challenging arguments.
|
# Bug: The 'cal' command can fail when provided with challenging arguments.
|
||||||
|
|
||||||
# Should not fail (because they are correct):
|
# Should not fail (because they are correct):
|
||||||
my $output = qx{../src/task rc:cal.rc cal 2>&1 >/dev/null};
|
my $output = qx{../src/task rc:cal.rc cal 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal');
|
||||||
|
|
||||||
# y due 2010 donkey 8
|
# y due 2010 donkey 8
|
||||||
$output = qx{../src/task rc:cal.rc cal y 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal y 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y');
|
||||||
$output = qx{../src/task rc:cal.rc cal 8 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal 8 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 8');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 8');
|
||||||
$output = qx{../src/task rc:cal.rc cal due 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal due 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal due');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal due');
|
||||||
$output = qx{../src/task rc:cal.rc cal 2010 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal 2010 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 2010');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 2010');
|
||||||
$output = qx{../src/task rc:cal.rc cal donkey 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal donkey 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal donkey');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal donkey');
|
||||||
|
|
||||||
# y due 2010 donkey 8
|
# y due 2010 donkey 8
|
||||||
$output = qx{../src/task rc:cal.rc cal y due 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal y due 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y due');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y due');
|
||||||
$output = qx{../src/task rc:cal.rc cal y 8 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal y 8 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y 8');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y 8');
|
||||||
$output = qx{../src/task rc:cal.rc cal y 2010 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal y 2010 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y 2010');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y 2010');
|
||||||
$output = qx{../src/task rc:cal.rc cal y donkey 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal y donkey 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y donkey');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y donkey');
|
||||||
$output = qx{../src/task rc:cal.rc cal 8 due 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal 8 due 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 8 due');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 8 due');
|
||||||
$output = qx{../src/task rc:cal.rc cal 8 2010 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal 8 2010 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 8 2010');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 8 2010');
|
||||||
$output = qx{../src/task rc:cal.rc cal 8 donkey 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal 8 donkey 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 8 donkey');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 8 donkey');
|
||||||
$output = qx{../src/task rc:cal.rc cal due 2010 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal due 2010 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal due 2010');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal due 2010');
|
||||||
$output = qx{../src/task rc:cal.rc cal due donkey 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal due donkey 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal due donkey');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal due donkey');
|
||||||
$output = qx{../src/task rc:cal.rc cal 2010 donkey 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal 2010 donkey 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 2010 donkey');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 2010 donkey');
|
||||||
|
|
||||||
# y 8 due 2010 donkey
|
# y 8 due 2010 donkey
|
||||||
$output = qx{../src/task rc:cal.rc cal y 8 due 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal y 8 due 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y 8 due');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y 8 due');
|
||||||
$output = qx{../src/task rc:cal.rc cal y 8 2010 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal y 8 2010 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y 8 2010');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y 8 2010');
|
||||||
$output = qx{../src/task rc:cal.rc cal y 8 donkey 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal y 8 donkey 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y 8 donkey');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y 8 donkey');
|
||||||
$output = qx{../src/task rc:cal.rc cal y due 2010 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal y due 2010 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y due 2010');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y due 2010');
|
||||||
$output = qx{../src/task rc:cal.rc cal y due donkey 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal y due donkey 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y due donkey');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y due donkey');
|
||||||
$output = qx{../src/task rc:cal.rc cal y 2010 donkey 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal y 2010 donkey 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y 2010 donkey');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y 2010 donkey');
|
||||||
$output = qx{../src/task rc:cal.rc cal 8 due 2010 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal 8 due 2010 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 8 due 2010');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 8 due 2010');
|
||||||
$output = qx{../src/task rc:cal.rc cal 8 due donkey 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal 8 due donkey 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 8 due donkey');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 8 due donkey');
|
||||||
$output = qx{../src/task rc:cal.rc cal 8 2010 donkey 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal 8 2010 donkey 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 8 2010 donkey');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 8 2010 donkey');
|
||||||
$output = qx{../src/task rc:cal.rc cal due 2010 8 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal due 2010 8 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal due 2010 8');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal due 2010 8');
|
||||||
$output = qx{../src/task rc:cal.rc cal due 2010 donkey 2>&1 >/dev/null};
|
$output = qx{../src/task rc:cal.rc cal due 2010 donkey 2>&1};
|
||||||
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal due 2010 donkey');
|
unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal due 2010 donkey');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -47,12 +47,12 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
#
|
#
|
||||||
# Thisisanewdescription
|
# Thisisanewdescription
|
||||||
|
|
||||||
qx{../src/task rc:bug.rc add This is the original text};
|
qx{../src/task rc:bug.rc add This is the original text 2>&1};
|
||||||
my $output = qx{../src/task rc:bug.rc info 1};
|
my $output = qx{../src/task rc:bug.rc info 1 2>&1};
|
||||||
like ($output, qr/Description\s+This is the original text/, 'original correct');
|
like ($output, qr/Description\s+This is the original text/, 'original correct');
|
||||||
|
|
||||||
qx{../src/task rc:bug.rc 1 modify This is the modified text};
|
qx{../src/task rc:bug.rc 1 modify This is the modified text 2>&1};
|
||||||
$output = qx{../src/task rc:bug.rc info 1};
|
$output = qx{../src/task rc:bug.rc info 1 2>&1};
|
||||||
like ($output, qr/Description\s+This is the modified text\n/, 'modified correct');
|
like ($output, qr/Description\s+This is the modified text\n/, 'modified correct');
|
||||||
|
|
||||||
# When a task is added like this:
|
# When a task is added like this:
|
||||||
|
@ -63,8 +63,8 @@ like ($output, qr/Description\s+This is the modified text\n/, 'modified correct'
|
||||||
#
|
#
|
||||||
# aaabbb:ccc ddd
|
# aaabbb:ccc ddd
|
||||||
|
|
||||||
qx{../src/task rc:bug.rc add aaa bbb:ccc ddd};
|
qx{../src/task rc:bug.rc add aaa bbb:ccc ddd 2>&1};
|
||||||
$output = qx{../src/task rc:bug.rc info 2};
|
$output = qx{../src/task rc:bug.rc info 2 2>&1};
|
||||||
like ($output, qr/Description\s+aaa bbb:ccc ddd\n/, 'properly concatenated');
|
like ($output, qr/Description\s+aaa bbb:ccc ddd\n/, 'properly concatenated');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -56,9 +56,9 @@ eval
|
||||||
{
|
{
|
||||||
$SIG{'ALRM'} = sub {die "alarm\n"};
|
$SIG{'ALRM'} = sub {die "alarm\n"};
|
||||||
alarm 10;
|
alarm 10;
|
||||||
my $output = qx{../src/task rc:hang.rc list;
|
my $output = qx{../src/task rc:hang.rc list 2>&1;
|
||||||
../src/task rc:hang.rc add due:today recur:1d infinite loop;
|
../src/task rc:hang.rc add due:today recur:1d infinite loop 2>&1;
|
||||||
../src/task rc:hang.rc info 1};
|
../src/task rc:hang.rc info 1 2>&1};
|
||||||
alarm 0;
|
alarm 0;
|
||||||
|
|
||||||
like ($output, qr/^Description\s+infinite loop\n/m, 'no hang');
|
like ($output, qr/^Description\s+infinite loop\n/m, 'no hang');
|
||||||
|
|
|
@ -40,35 +40,35 @@ if (open my $fh, '>', 'hasnt.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# 1
|
# 1
|
||||||
qx{../src/task rc:hasnt.rc add foo};
|
qx{../src/task rc:hasnt.rc add foo 2>&1};
|
||||||
|
|
||||||
# 2
|
# 2
|
||||||
qx{../src/task rc:hasnt.rc add foo};
|
qx{../src/task rc:hasnt.rc add foo 2>&1};
|
||||||
qx{../src/task rc:hasnt.rc 2 annotate bar};
|
qx{../src/task rc:hasnt.rc 2 annotate bar 2>&1};
|
||||||
|
|
||||||
# 3
|
# 3
|
||||||
qx{../src/task rc:hasnt.rc add foo};
|
qx{../src/task rc:hasnt.rc add foo 2>&1};
|
||||||
qx{../src/task rc:hasnt.rc 3 annotate bar};
|
qx{../src/task rc:hasnt.rc 3 annotate bar 2>&1};
|
||||||
qx{../src/task rc:hasnt.rc 3 annotate baz};
|
qx{../src/task rc:hasnt.rc 3 annotate baz 2>&1};
|
||||||
|
|
||||||
# 4
|
# 4
|
||||||
qx{../src/task rc:hasnt.rc add bar};
|
qx{../src/task rc:hasnt.rc add bar 2>&1};
|
||||||
|
|
||||||
# 5
|
# 5
|
||||||
qx{../src/task rc:hasnt.rc add bar};
|
qx{../src/task rc:hasnt.rc add bar 2>&1};
|
||||||
qx{../src/task rc:hasnt.rc 5 annotate foo};
|
qx{../src/task rc:hasnt.rc 5 annotate foo 2>&1};
|
||||||
|
|
||||||
# 6
|
# 6
|
||||||
qx{../src/task rc:hasnt.rc add bar};
|
qx{../src/task rc:hasnt.rc add bar 2>&1};
|
||||||
qx{../src/task rc:hasnt.rc 6 annotate foo};
|
qx{../src/task rc:hasnt.rc 6 annotate foo 2>&1};
|
||||||
qx{../src/task rc:hasnt.rc 6 annotate baz};
|
qx{../src/task rc:hasnt.rc 6 annotate baz 2>&1};
|
||||||
|
|
||||||
#7
|
#7
|
||||||
qx{../src/task rc:hasnt.rc add one};
|
qx{../src/task rc:hasnt.rc add one 2>&1};
|
||||||
qx{../src/task rc:hasnt.rc 7 annotate two};
|
qx{../src/task rc:hasnt.rc 7 annotate two 2>&1};
|
||||||
qx{../src/task rc:hasnt.rc 7 annotate three};
|
qx{../src/task rc:hasnt.rc 7 annotate three 2>&1};
|
||||||
|
|
||||||
my $output = qx{../src/task rc:hasnt.rc ls description.has:foo};
|
my $output = qx{../src/task rc:hasnt.rc ls description.has:foo 2>&1};
|
||||||
like ($output, qr/\n 1/, '1 has foo -> yes');
|
like ($output, qr/\n 1/, '1 has foo -> yes');
|
||||||
like ($output, qr/\n 2/, '2 has foo -> yes');
|
like ($output, qr/\n 2/, '2 has foo -> yes');
|
||||||
like ($output, qr/\n 3/, '3 has foo -> yes');
|
like ($output, qr/\n 3/, '3 has foo -> yes');
|
||||||
|
@ -77,7 +77,7 @@ like ($output, qr/\n 5/, '5 has foo -> yes');
|
||||||
like ($output, qr/\n 6/, '6 has foo -> yes');
|
like ($output, qr/\n 6/, '6 has foo -> yes');
|
||||||
unlike ($output, qr/\n 7/, '7 has foo -> no');
|
unlike ($output, qr/\n 7/, '7 has foo -> no');
|
||||||
|
|
||||||
$output = qx{../src/task rc:hasnt.rc ls description.hasnt:foo};
|
$output = qx{../src/task rc:hasnt.rc ls description.hasnt:foo 2>&1};
|
||||||
unlike ($output, qr/\n 1/, '1 hasnt foo -> no');
|
unlike ($output, qr/\n 1/, '1 hasnt foo -> no');
|
||||||
unlike ($output, qr/\n 2/, '2 hasnt foo -> no'); # 10
|
unlike ($output, qr/\n 2/, '2 hasnt foo -> no'); # 10
|
||||||
unlike ($output, qr/\n 3/, '3 hasnt foo -> no');
|
unlike ($output, qr/\n 3/, '3 hasnt foo -> no');
|
||||||
|
|
|
@ -74,65 +74,65 @@ Confirmed:
|
||||||
*y
|
*y
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
my $output = qx{../src/task rc:period.rc add daily due:tomorrow recur:daily};
|
my $output = qx{../src/task rc:period.rc add daily due:tomorrow recur:daily 2>&1};
|
||||||
unlike ($output, qr/was not recognized/, 'recur:daily');
|
unlike ($output, qr/was not recognized/, 'recur:daily');
|
||||||
|
|
||||||
$output = qx{../src/task rc:period.rc add day due:tomorrow recur:day};
|
$output = qx{../src/task rc:period.rc add day due:tomorrow recur:day 2>&1};
|
||||||
unlike ($output, qr/was not recognized/, 'recur:day');
|
unlike ($output, qr/was not recognized/, 'recur:day');
|
||||||
|
|
||||||
$output = qx{../src/task rc:period.rc add weekly due:tomorrow recur:weekly};
|
$output = qx{../src/task rc:period.rc add weekly due:tomorrow recur:weekly 2>&1};
|
||||||
unlike ($output, qr/was not recognized/, 'recur:weekly');
|
unlike ($output, qr/was not recognized/, 'recur:weekly');
|
||||||
|
|
||||||
$output = qx{../src/task rc:period.rc add sennight due:tomorrow recur:sennight};
|
$output = qx{../src/task rc:period.rc add sennight due:tomorrow recur:sennight 2>&1};
|
||||||
unlike ($output, qr/was not recognized/, 'recur:sennight');
|
unlike ($output, qr/was not recognized/, 'recur:sennight');
|
||||||
|
|
||||||
$output = qx{../src/task rc:period.rc add biweekly due:tomorrow recur:biweekly};
|
$output = qx{../src/task rc:period.rc add biweekly due:tomorrow recur:biweekly 2>&1};
|
||||||
unlike ($output, qr/was not recognized/, 'recur:biweekly');
|
unlike ($output, qr/was not recognized/, 'recur:biweekly');
|
||||||
|
|
||||||
$output = qx{../src/task rc:period.rc add fortnight due:tomorrow recur:fortnight};
|
$output = qx{../src/task rc:period.rc add fortnight due:tomorrow recur:fortnight 2>&1};
|
||||||
unlike ($output, qr/was not recognized/, 'recur:fortnight');
|
unlike ($output, qr/was not recognized/, 'recur:fortnight');
|
||||||
|
|
||||||
$output = qx{../src/task rc:period.rc add monthly due:tomorrow recur:monthly};
|
$output = qx{../src/task rc:period.rc add monthly due:tomorrow recur:monthly 2>&1};
|
||||||
unlike ($output, qr/was not recognized/, 'recur:monthly');
|
unlike ($output, qr/was not recognized/, 'recur:monthly');
|
||||||
|
|
||||||
$output = qx{../src/task rc:period.rc add quarterly due:tomorrow recur:quarterly};
|
$output = qx{../src/task rc:period.rc add quarterly due:tomorrow recur:quarterly 2>&1};
|
||||||
unlike ($output, qr/was not recognized/, 'recur:quarterly');
|
unlike ($output, qr/was not recognized/, 'recur:quarterly');
|
||||||
|
|
||||||
$output = qx{../src/task rc:period.rc add semiannual due:tomorrow recur:semiannual};
|
$output = qx{../src/task rc:period.rc add semiannual due:tomorrow recur:semiannual 2>&1};
|
||||||
unlike ($output, qr/was not recognized/, 'recur:semiannual');
|
unlike ($output, qr/was not recognized/, 'recur:semiannual');
|
||||||
|
|
||||||
$output = qx{../src/task rc:period.rc add bimonthly due:tomorrow recur:bimonthly};
|
$output = qx{../src/task rc:period.rc add bimonthly due:tomorrow recur:bimonthly 2>&1};
|
||||||
unlike ($output, qr/was not recognized/, 'recur:bimonthly');
|
unlike ($output, qr/was not recognized/, 'recur:bimonthly');
|
||||||
|
|
||||||
$output = qx{../src/task rc:period.rc add biannual due:tomorrow recur:biannual};
|
$output = qx{../src/task rc:period.rc add biannual due:tomorrow recur:biannual 2>&1};
|
||||||
unlike ($output, qr/was not recognized/, 'recur:biannual');
|
unlike ($output, qr/was not recognized/, 'recur:biannual');
|
||||||
|
|
||||||
$output = qx{../src/task rc:period.rc add biyearly due:tomorrow recur:biyearly};
|
$output = qx{../src/task rc:period.rc add biyearly due:tomorrow recur:biyearly 2>&1};
|
||||||
unlike ($output, qr/was not recognized/, 'recur:biyearly');
|
unlike ($output, qr/was not recognized/, 'recur:biyearly');
|
||||||
|
|
||||||
$output = qx{../src/task rc:period.rc add annual due:tomorrow recur:annual};
|
$output = qx{../src/task rc:period.rc add annual due:tomorrow recur:annual 2>&1};
|
||||||
unlike ($output, qr/was not recognized/, 'recur:annual');
|
unlike ($output, qr/was not recognized/, 'recur:annual');
|
||||||
|
|
||||||
$output = qx{../src/task rc:period.rc add yearly due:tomorrow recur:yearly};
|
$output = qx{../src/task rc:period.rc add yearly due:tomorrow recur:yearly 2>&1};
|
||||||
unlike ($output, qr/was not recognized/, 'recur:yearly');
|
unlike ($output, qr/was not recognized/, 'recur:yearly');
|
||||||
|
|
||||||
$output = qx{../src/task rc:period.rc add 2d due:tomorrow recur:2d};
|
$output = qx{../src/task rc:period.rc add 2d due:tomorrow recur:2d 2>&1};
|
||||||
unlike ($output, qr/was not recognized/, 'recur:2d');
|
unlike ($output, qr/was not recognized/, 'recur:2d');
|
||||||
|
|
||||||
$output = qx{../src/task rc:period.rc add 2w due:tomorrow recur:2w};
|
$output = qx{../src/task rc:period.rc add 2w due:tomorrow recur:2w 2>&1};
|
||||||
unlike ($output, qr/was not recognized/, 'recur:2w');
|
unlike ($output, qr/was not recognized/, 'recur:2w');
|
||||||
|
|
||||||
$output = qx{../src/task rc:period.rc add 2m due:tomorrow recur:2mo};
|
$output = qx{../src/task rc:period.rc add 2m due:tomorrow recur:2mo 2>&1};
|
||||||
unlike ($output, qr/was not recognized/, 'recur:2m');
|
unlike ($output, qr/was not recognized/, 'recur:2m');
|
||||||
|
|
||||||
$output = qx{../src/task rc:period.rc add 2q due:tomorrow recur:2q};
|
$output = qx{../src/task rc:period.rc add 2q due:tomorrow recur:2q 2>&1};
|
||||||
unlike ($output, qr/was not recognized/, 'recur:2q');
|
unlike ($output, qr/was not recognized/, 'recur:2q');
|
||||||
|
|
||||||
$output = qx{../src/task rc:period.rc add 2y due:tomorrow recur:2y};
|
$output = qx{../src/task rc:period.rc add 2y due:tomorrow recur:2y 2>&1};
|
||||||
unlike ($output, qr/was not recognized/, 'recur:2y');
|
unlike ($output, qr/was not recognized/, 'recur:2y');
|
||||||
|
|
||||||
# Verify that the recurring task instances get created. One of each.
|
# Verify that the recurring task instances get created. One of each.
|
||||||
$output = qx{../src/task rc:period.rc list};
|
$output = qx{../src/task rc:period.rc list 2>&1};
|
||||||
like ($output, qr/\bdaily\b/, 'verify daily');
|
like ($output, qr/\bdaily\b/, 'verify daily');
|
||||||
like ($output, qr/\bday\b/, 'verify day');
|
like ($output, qr/\bday\b/, 'verify day');
|
||||||
like ($output, qr/\bweekly\b/, 'verify weekly');
|
like ($output, qr/\bweekly\b/, 'verify weekly');
|
||||||
|
@ -153,7 +153,7 @@ like ($output, qr/\b2m\b/, 'verify 2m');
|
||||||
like ($output, qr/\b2q\b/, 'verify 2q');
|
like ($output, qr/\b2q\b/, 'verify 2q');
|
||||||
like ($output, qr/\b2y\b/, 'verify 2y');
|
like ($output, qr/\b2y\b/, 'verify 2y');
|
||||||
|
|
||||||
$output = qx{../src/task rc:period.rc diag};
|
$output = qx{../src/task rc:period.rc diag 2>&1};
|
||||||
like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected');
|
like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -40,10 +40,10 @@ if (open my $fh, '>', 'range.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add three tasks, and attempt to list the middle one within a range.
|
# Add three tasks, and attempt to list the middle one within a range.
|
||||||
qx{../src/task rc:range.rc add one due:8/1/2009};
|
qx{../src/task rc:range.rc add one due:8/1/2009 2>&1};
|
||||||
qx{../src/task rc:range.rc add two due:8/3/2009};
|
qx{../src/task rc:range.rc add two due:8/3/2009 2>&1};
|
||||||
qx{../src/task rc:range.rc add three due:8/5/2009};
|
qx{../src/task rc:range.rc add three due:8/5/2009 2>&1};
|
||||||
my $output = qx{../src/task rc:range.rc ls due.after:8/2/2009 due.before:8/4/2009};
|
my $output = qx{../src/task rc:range.rc ls due.after:8/2/2009 due.before:8/4/2009 2>&1};
|
||||||
unlike ($output, qr/one/, 'Missing prior to range');
|
unlike ($output, qr/one/, 'Missing prior to range');
|
||||||
like ($output, qr/two/, 'Found within range');
|
like ($output, qr/two/, 'Found within range');
|
||||||
unlike ($output, qr/three/, 'Missing after range');
|
unlike ($output, qr/three/, 'Missing after range');
|
||||||
|
|
|
@ -40,8 +40,8 @@ if (open my $fh, '>', 'recur.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add a recurring task with no due date, look for expected error.
|
# Add a recurring task with no due date, look for expected error.
|
||||||
qx{../src/task rc:recur.rc add foo recur:daily};
|
qx{../src/task rc:recur.rc add foo recur:daily 2>&1};
|
||||||
my $output = qx{../src/task rc:recur.rc info 1};
|
my $output = qx{../src/task rc:recur.rc info 1 2>&1};
|
||||||
unlike ($output, qr/Description\s+foo/, 'task not created - missing due date');
|
unlike ($output, qr/Description\s+foo/, 'task not created - missing due date');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -38,16 +38,16 @@ if (open my $fh, '>', 'bug_sort.rc')
|
||||||
ok (-r 'bug_sort.rc', 'Created bug_sort.rc');
|
ok (-r 'bug_sort.rc', 'Created bug_sort.rc');
|
||||||
}
|
}
|
||||||
|
|
||||||
my $setup = "../src/task rc:bug_sort.rc add one;"
|
my $setup = "../src/task rc:bug_sort.rc add one 2>&1;"
|
||||||
. "../src/task rc:bug_sort.rc add two;"
|
. "../src/task rc:bug_sort.rc add two 2>&1;"
|
||||||
. "../src/task rc:bug_sort.rc add three recur:daily due:eom;";
|
. "../src/task rc:bug_sort.rc add three recur:daily due:eom 2>&1;";
|
||||||
qx{$setup};
|
qx{$setup};
|
||||||
|
|
||||||
my $output = qx{../src/task rc:bug_sort.rc list};
|
my $output = qx{../src/task rc:bug_sort.rc list 2>&1};
|
||||||
like ($output, qr/three.*(?:one.*two|two.*one)/msi, 'list did not hang');
|
like ($output, qr/three.*(?:one.*two|two.*one)/msi, 'list did not hang');
|
||||||
|
|
||||||
qx{../src/task rc:bug_sort.rc 1 modify priority:H};
|
qx{../src/task rc:bug_sort.rc 1 modify priority:H 2>&1};
|
||||||
$output = qx{../src/task rc:bug_sort.rc list};
|
$output = qx{../src/task rc:bug_sort.rc list 2>&1};
|
||||||
like ($output, qr/three.*one.*two/msi, 'list did not hang after pri:H on 1');
|
like ($output, qr/three.*one.*two/msi, 'list did not hang after pri:H on 1');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -39,10 +39,10 @@ if (open my $fh, '>', 'extra.rc')
|
||||||
ok (-r 'extra.rc', 'Created extra.rc');
|
ok (-r 'extra.rc', 'Created extra.rc');
|
||||||
}
|
}
|
||||||
|
|
||||||
qx{../src/task rc:extra.rc add foo};
|
qx{../src/task rc:extra.rc add foo 2>&1};
|
||||||
qx{../src/task rc:extra.rc 1 start pri:L};
|
qx{../src/task rc:extra.rc 1 start pri:L 2>&1};
|
||||||
qx{../src/task rc:extra.rc 1 stop pro:bar};
|
qx{../src/task rc:extra.rc 1 stop pro:bar 2>&1};
|
||||||
my $output = qx{../src/task rc:extra.rc list};
|
my $output = qx{../src/task rc:extra.rc list 2>&1};
|
||||||
like ($output, qr/foo/, 'Task shown');
|
like ($output, qr/foo/, 'Task shown');
|
||||||
like ($output, qr/1 task/, 'Correct count');
|
like ($output, qr/1 task/, 'Correct count');
|
||||||
like ($output, qr/L/, 'Correct priority');
|
like ($output, qr/L/, 'Correct priority');
|
||||||
|
|
|
@ -41,16 +41,16 @@ if (open my $fh, '>', 'summary.rc')
|
||||||
|
|
||||||
# Add three tasks. Do 1, delete 1, leave 1 pending. Summary should depict a
|
# Add three tasks. Do 1, delete 1, leave 1 pending. Summary should depict a
|
||||||
# 50% completion.
|
# 50% completion.
|
||||||
qx{../src/task rc:summary.rc add project:A one};
|
qx{../src/task rc:summary.rc add project:A one 2>&1};
|
||||||
qx{../src/task rc:summary.rc add project:A two};
|
qx{../src/task rc:summary.rc add project:A two 2>&1};
|
||||||
qx{../src/task rc:summary.rc add project:A three};
|
qx{../src/task rc:summary.rc add project:A three 2>&1};
|
||||||
qx{../src/task rc:summary.rc 1 do};
|
qx{../src/task rc:summary.rc 1 do 2>&1};
|
||||||
qx{../src/task rc:summary.rc 2 delete};
|
qx{../src/task rc:summary.rc 2 delete 2>&1};
|
||||||
my $output = qx{../src/task rc:summary.rc summary};
|
my $output = qx{../src/task rc:summary.rc summary 2>&1};
|
||||||
like ($output, qr/A\s+1\s+(?:-|\d\ssecs?)\s+50%/, 'summary correctly shows 50% before report');
|
like ($output, qr/A\s+1\s+(?:-|\d\ssecs?)\s+50%/, 'summary correctly shows 50% before report');
|
||||||
|
|
||||||
qx{../src/task rc:summary.rc list};
|
qx{../src/task rc:summary.rc list 2>&1};
|
||||||
$output = qx{../src/task rc:summary.rc summary};
|
$output = qx{../src/task rc:summary.rc summary 2>&1};
|
||||||
like ($output, qr/A\s+1\s+(?:-|\d\ssecs?)\s+50%/, 'summary correctly shows 50% after report');
|
like ($output, qr/A\s+1\s+(?:-|\d\ssecs?)\s+50%/, 'summary correctly shows 50% after report');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -41,39 +41,39 @@ if (open my $fh, '>', 'uuid.rc')
|
||||||
|
|
||||||
# Add a task, dup it, add a recurring task, list. Then make sure they all have
|
# Add a task, dup it, add a recurring task, list. Then make sure they all have
|
||||||
# unique UUID values.
|
# unique UUID values.
|
||||||
qx{../src/task rc:uuid.rc add simple};
|
qx{../src/task rc:uuid.rc add simple 2>&1};
|
||||||
qx{../src/task rc:uuid.rc 1 duplicate};
|
qx{../src/task rc:uuid.rc 1 duplicate 2>&1};
|
||||||
qx{../src/task rc:uuid.rc add periodic recur:daily due:yesterday};
|
qx{../src/task rc:uuid.rc add periodic recur:daily due:yesterday 2>&1};
|
||||||
qx{../src/task rc:uuid.rc ls};
|
qx{../src/task rc:uuid.rc ls 2>&1};
|
||||||
|
|
||||||
my @all_uuids;
|
my @all_uuids;
|
||||||
my %unique_uuids;
|
my %unique_uuids;
|
||||||
my $output = qx{../src/task rc:uuid.rc 1 info};
|
my $output = qx{../src/task rc:uuid.rc 1 info 2>&1};
|
||||||
my ($uuid) = $output =~ /UUID\s+(\S+)/;
|
my ($uuid) = $output =~ /UUID\s+(\S+)/;
|
||||||
push @all_uuids, $uuid;
|
push @all_uuids, $uuid;
|
||||||
$unique_uuids{$uuid} = undef;
|
$unique_uuids{$uuid} = undef;
|
||||||
|
|
||||||
$output = qx{../src/task rc:uuid.rc 2 info};
|
$output = qx{../src/task rc:uuid.rc 2 info 2>&1};
|
||||||
($uuid) = $output =~ /UUID\s+(\S+)/;
|
($uuid) = $output =~ /UUID\s+(\S+)/;
|
||||||
push @all_uuids, $uuid;
|
push @all_uuids, $uuid;
|
||||||
$unique_uuids{$uuid} = undef;
|
$unique_uuids{$uuid} = undef;
|
||||||
|
|
||||||
$output = qx{../src/task rc:uuid.rc 3 info};
|
$output = qx{../src/task rc:uuid.rc 3 info 2>&1};
|
||||||
($uuid) = $output =~ /UUID\s+(\S+)/;
|
($uuid) = $output =~ /UUID\s+(\S+)/;
|
||||||
push @all_uuids, $uuid;
|
push @all_uuids, $uuid;
|
||||||
$unique_uuids{$uuid} = undef;
|
$unique_uuids{$uuid} = undef;
|
||||||
|
|
||||||
$output = qx{../src/task rc:uuid.rc 4 info};
|
$output = qx{../src/task rc:uuid.rc 4 info 2>&1};
|
||||||
($uuid) = $output =~ /UUID\s+(\S+)/;
|
($uuid) = $output =~ /UUID\s+(\S+)/;
|
||||||
push @all_uuids, $uuid;
|
push @all_uuids, $uuid;
|
||||||
$unique_uuids{$uuid} = undef;
|
$unique_uuids{$uuid} = undef;
|
||||||
|
|
||||||
$output = qx{../src/task rc:uuid.rc 5 info};
|
$output = qx{../src/task rc:uuid.rc 5 info 2>&1};
|
||||||
($uuid) = $output =~ /UUID\s+(\S+)/;
|
($uuid) = $output =~ /UUID\s+(\S+)/;
|
||||||
push @all_uuids, $uuid;
|
push @all_uuids, $uuid;
|
||||||
$unique_uuids{$uuid} = undef;
|
$unique_uuids{$uuid} = undef;
|
||||||
|
|
||||||
$output = qx{../src/task rc:uuid.rc 6 info};
|
$output = qx{../src/task rc:uuid.rc 6 info 2>&1};
|
||||||
($uuid) = $output =~ /UUID\s+(\S+)/;
|
($uuid) = $output =~ /UUID\s+(\S+)/;
|
||||||
push @all_uuids, $uuid;
|
push @all_uuids, $uuid;
|
||||||
$unique_uuids{$uuid} = undef;
|
$unique_uuids{$uuid} = undef;
|
||||||
|
@ -81,7 +81,7 @@ $unique_uuids{$uuid} = undef;
|
||||||
is (scalar (@all_uuids), 6, '6 tasks created');
|
is (scalar (@all_uuids), 6, '6 tasks created');
|
||||||
is (scalar (keys %unique_uuids), 6, '6 unique UUIDs');
|
is (scalar (keys %unique_uuids), 6, '6 unique UUIDs');
|
||||||
|
|
||||||
$output = qx{../src/task rc:uuid.rc diag};
|
$output = qx{../src/task rc:uuid.rc diag 2>&1};
|
||||||
like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected');
|
like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
58
test/bulk.t
58
test/bulk.t
|
@ -40,24 +40,24 @@ if (open my $fh, '>', 'bulk.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Exercise bulk and non-bulk confirmations for 'delete' and 'modify'.
|
# Exercise bulk and non-bulk confirmations for 'delete' and 'modify'.
|
||||||
qx{../src/task rc:bulk.rc add one};
|
qx{../src/task rc:bulk.rc add one 2>&1};
|
||||||
qx{../src/task rc:bulk.rc add two};
|
qx{../src/task rc:bulk.rc add two 2>&1};
|
||||||
qx{../src/task rc:bulk.rc add three};
|
qx{../src/task rc:bulk.rc add three 2>&1};
|
||||||
qx{../src/task rc:bulk.rc add four};
|
qx{../src/task rc:bulk.rc add four 2>&1};
|
||||||
qx{../src/task rc:bulk.rc add five};
|
qx{../src/task rc:bulk.rc add five 2>&1};
|
||||||
qx{../src/task rc:bulk.rc add six};
|
qx{../src/task rc:bulk.rc add six 2>&1};
|
||||||
qx{../src/task rc:bulk.rc add seven};
|
qx{../src/task rc:bulk.rc add seven 2>&1};
|
||||||
qx{../src/task rc:bulk.rc add eight};
|
qx{../src/task rc:bulk.rc add eight 2>&1};
|
||||||
qx{../src/task rc:bulk.rc add nine};
|
qx{../src/task rc:bulk.rc add nine 2>&1};
|
||||||
qx{../src/task rc:bulk.rc add ten};
|
qx{../src/task rc:bulk.rc add ten 2>&1};
|
||||||
qx{../src/task rc:bulk.rc add eleven};
|
qx{../src/task rc:bulk.rc add eleven 2>&1};
|
||||||
qx{../src/task rc:bulk.rc add twelve};
|
qx{../src/task rc:bulk.rc add twelve 2>&1};
|
||||||
qx{../src/task rc:bulk.rc add thirteen};
|
qx{../src/task rc:bulk.rc add thirteen 2>&1};
|
||||||
qx{../src/task rc:bulk.rc add fourteen};
|
qx{../src/task rc:bulk.rc add fourteen 2>&1};
|
||||||
qx{../src/task rc:bulk.rc add fifteen};
|
qx{../src/task rc:bulk.rc add fifteen 2>&1};
|
||||||
qx{../src/task rc:bulk.rc add sixteen};
|
qx{../src/task rc:bulk.rc add sixteen 2>&1};
|
||||||
qx{../src/task rc:bulk.rc add seventeen};
|
qx{../src/task rc:bulk.rc add seventeen 2>&1};
|
||||||
qx{../src/task rc:bulk.rc add eighteen};
|
qx{../src/task rc:bulk.rc add eighteen 2>&1};
|
||||||
|
|
||||||
# The 'delete' command is used, but it could be any write command.
|
# The 'delete' command is used, but it could be any write command.
|
||||||
# Note that 'y' is passed to task despite rc.confirmation=off. This allows
|
# Note that 'y' is passed to task despite rc.confirmation=off. This allows
|
||||||
|
@ -66,38 +66,38 @@ qx{../src/task rc:bulk.rc add eighteen};
|
||||||
# 'yes' tests:
|
# 'yes' tests:
|
||||||
|
|
||||||
# Test with 1 task. 1 is a special case.
|
# Test with 1 task. 1 is a special case.
|
||||||
my $output = qx{echo 'y' | ../src/task rc:bulk.rc rc.confirmation=off 1 delete};
|
my $output = qx{echo 'y' | ../src/task rc:bulk.rc rc.confirmation=off 1 delete 2>&1};
|
||||||
unlike ($output, qr/\(yes\/no\)/, 'Single delete with no confirmation');
|
unlike ($output, qr/\(yes\/no\)/, 'Single delete with no confirmation');
|
||||||
unlike ($output, qr/\(yes\/no\/all\/quit\)/, 'Single delete with no bulk confirmation');
|
unlike ($output, qr/\(yes\/no\/all\/quit\)/, 'Single delete with no bulk confirmation');
|
||||||
like ($output, qr/Deleting task 1/, 'Verified delete 1');
|
like ($output, qr/Deleting task 1/, 'Verified delete 1');
|
||||||
|
|
||||||
$output = qx{echo 'y' | ../src/task rc:bulk.rc rc.confirmation=on 2 delete};
|
$output = qx{echo 'y' | ../src/task rc:bulk.rc rc.confirmation=on 2 delete 2>&1};
|
||||||
like ($output, qr/\(yes\/no\)/, 'Single delete with confirmation');
|
like ($output, qr/\(yes\/no\)/, 'Single delete with confirmation');
|
||||||
unlike ($output, qr/\(yes\/no\/all\/quit\)/, 'Single delete with no bulk confirmation');
|
unlike ($output, qr/\(yes\/no\/all\/quit\)/, 'Single delete with no bulk confirmation');
|
||||||
like ($output, qr/Deleting task 2/, 'Verified delete 2');
|
like ($output, qr/Deleting task 2/, 'Verified delete 2');
|
||||||
|
|
||||||
# Test with 2 tasks. 2 is greater than 1 and less than bulk.
|
# Test with 2 tasks. 2 is greater than 1 and less than bulk.
|
||||||
$output = qx{echo 'y' | ../src/task rc:bulk.rc rc.confirmation=off 3-4 delete};
|
$output = qx{echo 'y' | ../src/task rc:bulk.rc rc.confirmation=off 3-4 delete 2>&1};
|
||||||
unlike ($output, qr/\(yes\/no\)/, 'Multiple delete with no confirmation');
|
unlike ($output, qr/\(yes\/no\)/, 'Multiple delete with no confirmation');
|
||||||
unlike ($output, qr/\(yes\/no\/all\/quit\)/, 'Multiple delete with no bulk confirmation');
|
unlike ($output, qr/\(yes\/no\/all\/quit\)/, 'Multiple delete with no bulk confirmation');
|
||||||
like ($output, qr/Deleting task 3/, 'Verified delete 3');
|
like ($output, qr/Deleting task 3/, 'Verified delete 3');
|
||||||
like ($output, qr/Deleting task 4/, 'Verified delete 4');
|
like ($output, qr/Deleting task 4/, 'Verified delete 4');
|
||||||
|
|
||||||
$output = qx{printf 'y\ny\n' | ../src/task rc:bulk.rc rc.confirmation=on 5-6 delete};
|
$output = qx{printf 'y\ny\n' | ../src/task rc:bulk.rc rc.confirmation=on 5-6 delete 2>&1};
|
||||||
unlike ($output, qr/\(yes\/no\)/, 'Multiple delete with confirmation');
|
unlike ($output, qr/\(yes\/no\)/, 'Multiple delete with confirmation');
|
||||||
like ($output, qr/\(yes\/no\/all\/quit\)/, 'Multiple delete with bulk confirmation');
|
like ($output, qr/\(yes\/no\/all\/quit\)/, 'Multiple delete with bulk confirmation');
|
||||||
like ($output, qr/Deleting task 5/, 'Verified delete 5');
|
like ($output, qr/Deleting task 5/, 'Verified delete 5');
|
||||||
like ($output, qr/Deleting task 6/, 'Verified delete 6');
|
like ($output, qr/Deleting task 6/, 'Verified delete 6');
|
||||||
|
|
||||||
# Test with 3 tasks. 3 is considered bulk.
|
# Test with 3 tasks. 3 is considered bulk.
|
||||||
$output = qx{printf 'y\ny\ny\n' | ../src/task rc:bulk.rc rc.confirmation=off 7-9 delete};
|
$output = qx{printf 'y\ny\ny\n' | ../src/task rc:bulk.rc rc.confirmation=off 7-9 delete 2>&1};
|
||||||
unlike ($output, qr/\(yes\/no\)/, 'Bulk delete with no confirmation');
|
unlike ($output, qr/\(yes\/no\)/, 'Bulk delete with no confirmation');
|
||||||
like ($output, qr/\(yes\/no\/all\/quit\)/, 'Bulk delete with no bulk confirmation');
|
like ($output, qr/\(yes\/no\/all\/quit\)/, 'Bulk delete with no bulk confirmation');
|
||||||
like ($output, qr/Deleting task 7/, 'Verified delete 7');
|
like ($output, qr/Deleting task 7/, 'Verified delete 7');
|
||||||
like ($output, qr/Deleting task 8/, 'Verified delete 8');
|
like ($output, qr/Deleting task 8/, 'Verified delete 8');
|
||||||
like ($output, qr/Deleting task 9/, 'Verified delete 9');
|
like ($output, qr/Deleting task 9/, 'Verified delete 9');
|
||||||
|
|
||||||
$output = qx{printf 'y\ny\ny\n' | ../src/task rc:bulk.rc rc.confirmation=on 10-12 delete};
|
$output = qx{printf 'y\ny\ny\n' | ../src/task rc:bulk.rc rc.confirmation=on 10-12 delete 2>&1};
|
||||||
unlike ($output, qr/\(yes\/no\)/, 'Bulk delete with confirmation');
|
unlike ($output, qr/\(yes\/no\)/, 'Bulk delete with confirmation');
|
||||||
like ($output, qr/\(yes\/no\/all\/quit\)/, 'Bulk delete with bulk confirmation');
|
like ($output, qr/\(yes\/no\/all\/quit\)/, 'Bulk delete with bulk confirmation');
|
||||||
like ($output, qr/Deleting task 10/, 'Verified delete 10');
|
like ($output, qr/Deleting task 10/, 'Verified delete 10');
|
||||||
|
@ -107,25 +107,25 @@ like ($output, qr/Deleting task 12/, 'Verified delete 12');
|
||||||
# 'no' tests:
|
# 'no' tests:
|
||||||
|
|
||||||
# Test with 1 task, denying delete.
|
# Test with 1 task, denying delete.
|
||||||
$output = qx{echo 'n' | ../src/task rc:bulk.rc rc.confirmation=on 13 delete};
|
$output = qx{echo 'n' | ../src/task rc:bulk.rc rc.confirmation=on 13 delete 2>&1};
|
||||||
like ($output, qr/\(yes\/no\)/, 'Single delete with confirmation');
|
like ($output, qr/\(yes\/no\)/, 'Single delete with confirmation');
|
||||||
unlike ($output, qr/\(yes\/no\/all\/quit\)/, 'Single delete with no bulk confirmation');
|
unlike ($output, qr/\(yes\/no\/all\/quit\)/, 'Single delete with no bulk confirmation');
|
||||||
unlike ($output, qr/Deleting task/, 'Verified no delete 13');
|
unlike ($output, qr/Deleting task/, 'Verified no delete 13');
|
||||||
|
|
||||||
# Test with 2 tasks, denying delete.
|
# Test with 2 tasks, denying delete.
|
||||||
$output = qx{printf 'n\nn\n' | ../src/task rc:bulk.rc rc.confirmation=on 13-14 delete};
|
$output = qx{printf 'n\nn\n' | ../src/task rc:bulk.rc rc.confirmation=on 13-14 delete 2>&1};
|
||||||
unlike ($output, qr/\(yes\/no\)/, 'Multiple delete with confirmation');
|
unlike ($output, qr/\(yes\/no\)/, 'Multiple delete with confirmation');
|
||||||
like ($output, qr/\(yes\/no\/all\/quit\)/, 'Multiple delete with no bulk confirmation');
|
like ($output, qr/\(yes\/no\/all\/quit\)/, 'Multiple delete with no bulk confirmation');
|
||||||
unlike ($output, qr/Deleting task/, 'Verified no delete 13-14');
|
unlike ($output, qr/Deleting task/, 'Verified no delete 13-14');
|
||||||
|
|
||||||
# Test with 3 tasks, denying delete.
|
# Test with 3 tasks, denying delete.
|
||||||
$output = qx{printf 'n\nn\nn\n' | ../src/task rc:bulk.rc rc.confirmation=on 13-15 delete};
|
$output = qx{printf 'n\nn\nn\n' | ../src/task rc:bulk.rc rc.confirmation=on 13-15 delete 2>&1};
|
||||||
unlike ($output, qr/\(yes\/no\)/, 'Bulk delete with confirmation');
|
unlike ($output, qr/\(yes\/no\)/, 'Bulk delete with confirmation');
|
||||||
like ($output, qr/\(yes\/no\/all\/quit\)/, 'Bulk delete with no bulk confirmation');
|
like ($output, qr/\(yes\/no\/all\/quit\)/, 'Bulk delete with no bulk confirmation');
|
||||||
unlike ($output, qr/Deleting task/, 'Verified no delete 13-15');
|
unlike ($output, qr/Deleting task/, 'Verified no delete 13-15');
|
||||||
|
|
||||||
# 'all' tests:
|
# 'all' tests:
|
||||||
$output = qx{echo 'all' | ../src/task rc:bulk.rc rc.confirmation=on 13-15 delete};
|
$output = qx{echo 'all' | ../src/task rc:bulk.rc rc.confirmation=on 13-15 delete 2>&1};
|
||||||
unlike ($output, qr/\(yes\/no\)/, 'Bulk delete with confirmation');
|
unlike ($output, qr/\(yes\/no\)/, 'Bulk delete with confirmation');
|
||||||
like ($output, qr/\(yes\/no\/all\/quit\)/, 'Bulk delete with bulk confirmation');
|
like ($output, qr/\(yes\/no\/all\/quit\)/, 'Bulk delete with bulk confirmation');
|
||||||
like ($output, qr/Deleting task/, 'Verified delete 13');
|
like ($output, qr/Deleting task/, 'Verified delete 13');
|
||||||
|
@ -133,7 +133,7 @@ like ($output, qr/Deleting task/, 'Verified delete 14');
|
||||||
like ($output, qr/Deleting task/, 'Verified delete 15');
|
like ($output, qr/Deleting task/, 'Verified delete 15');
|
||||||
|
|
||||||
# 'quit' tests:
|
# 'quit' tests:
|
||||||
$output = qx{echo 'quit' | ../src/task rc:bulk.rc rc.confirmation=on 16-18 delete};
|
$output = qx{echo 'quit' | ../src/task rc:bulk.rc rc.confirmation=on 16-18 delete 2>&1};
|
||||||
unlike ($output, qr/\(yes\/no\)/, 'Bulk delete with no confirmation');
|
unlike ($output, qr/\(yes\/no\)/, 'Bulk delete with no confirmation');
|
||||||
like ($output, qr/\(yes\/no\/all\/quit\)/, 'Bulk delete with no bulk confirmation');
|
like ($output, qr/\(yes\/no\/all\/quit\)/, 'Bulk delete with no bulk confirmation');
|
||||||
unlike ($output, qr/Deleting task/, 'Verified delete 16');
|
unlike ($output, qr/Deleting task/, 'Verified delete 16');
|
||||||
|
|
74
test/cal.t
74
test/cal.t
|
@ -65,7 +65,7 @@ if ($day <= 9)
|
||||||
}
|
}
|
||||||
|
|
||||||
# task cal and task cal y
|
# task cal and task cal y
|
||||||
my $output = qx{../src/task rc:cal.rc rc._forcecolor:on cal};
|
my $output = qx{../src/task rc:cal.rc rc._forcecolor:on cal 2>&1};
|
||||||
if ($wday == 6 || $wday == 0)
|
if ($wday == 6 || $wday == 0)
|
||||||
{
|
{
|
||||||
like ($output, qr/\[30;106m$day/, 'Current day is highlighted');
|
like ($output, qr/\[30;106m$day/, 'Current day is highlighted');
|
||||||
|
@ -75,14 +75,14 @@ else
|
||||||
like ($output, qr/\[30;46m$day/, 'Current day is highlighted');
|
like ($output, qr/\[30;46m$day/, 'Current day is highlighted');
|
||||||
}
|
}
|
||||||
like ($output, qr/$month\S*?\s+?$year/, 'Current month and year are displayed');
|
like ($output, qr/$month\S*?\s+?$year/, 'Current month and year are displayed');
|
||||||
$output = qx{../src/task rc:cal.rc add zero};
|
$output = qx{../src/task rc:cal.rc add zero 2>&1};
|
||||||
unlike ($output, qr/\[41m\d+/, 'No overdue tasks are present');
|
unlike ($output, qr/\[41m\d+/, 'No overdue tasks are present');
|
||||||
unlike ($output, qr/\[43m\d+/, 'No due tasks are present');
|
unlike ($output, qr/\[43m\d+/, 'No due tasks are present');
|
||||||
$output = qx{../src/task rc:cal.rc rc.weekstart:Sunday cal};
|
$output = qx{../src/task rc:cal.rc rc.weekstart:Sunday cal 2>&1};
|
||||||
like ($output, qr/Su Mo Tu/, 'Week starts on Sunday');
|
like ($output, qr/Su Mo Tu/, 'Week starts on Sunday');
|
||||||
$output = qx{../src/task rc:cal.rc rc.weekstart:Monday cal};
|
$output = qx{../src/task rc:cal.rc rc.weekstart:Monday cal 2>&1};
|
||||||
like ($output, qr/Fr Sa Su/, 'Week starts on Monday');
|
like ($output, qr/Fr Sa Su/, 'Week starts on Monday');
|
||||||
$output = qx{../src/task rc:cal.rc cal y};
|
$output = qx{../src/task rc:cal.rc cal y 2>&1};
|
||||||
like ($output, qr/$month\S*?\s+?$year/, 'Current month and year are displayed');
|
like ($output, qr/$month\S*?\s+?$year/, 'Current month and year are displayed');
|
||||||
if ($month eq "Jan")
|
if ($month eq "Jan")
|
||||||
{
|
{
|
||||||
|
@ -96,21 +96,21 @@ if ($month eq "Jan")
|
||||||
unlike ($output, qr/$month\S*?\s+?$nextyear/, 'Current month and year ahead are not displayed');
|
unlike ($output, qr/$month\S*?\s+?$nextyear/, 'Current month and year ahead are not displayed');
|
||||||
|
|
||||||
# task cal due and task cal due y
|
# task cal due and task cal due y
|
||||||
qx{../src/task rc:cal.rc add due:20190515 one};
|
qx{../src/task rc:cal.rc add due:20190515 one 2>&1};
|
||||||
qx{../src/task rc:cal.rc add due:20200123 two};
|
qx{../src/task rc:cal.rc add due:20200123 two 2>&1};
|
||||||
$output = qx{../src/task rc:cal.rc rc._forcecolor:on cal due};
|
$output = qx{../src/task rc:cal.rc rc._forcecolor:on cal due 2>&1};
|
||||||
unlike ($output, qr/April 2019/, 'April 2019 is not displayed');
|
unlike ($output, qr/April 2019/, 'April 2019 is not displayed');
|
||||||
like ($output, qr/May 2019/, 'May 2019 is displayed');
|
like ($output, qr/May 2019/, 'May 2019 is displayed');
|
||||||
unlike ($output, qr/January 2020/, 'January 2020 is not displayed');
|
unlike ($output, qr/January 2020/, 'January 2020 is not displayed');
|
||||||
like ($output, qr/30;42m15/, 'Task 1 is color-coded due');
|
like ($output, qr/30;42m15/, 'Task 1 is color-coded due');
|
||||||
$output = qx{../src/task rc:cal.rc rc._forcecolor:on cal due y};
|
$output = qx{../src/task rc:cal.rc rc._forcecolor:on cal due y 2>&1};
|
||||||
like ($output, qr/30;42m23/, 'Task 2 is color-coded due');
|
like ($output, qr/30;42m23/, 'Task 2 is color-coded due');
|
||||||
like ($output, qr/April 2020/, 'April 2020 is displayed');
|
like ($output, qr/April 2020/, 'April 2020 is displayed');
|
||||||
unlike ($output, qr/May 2020/, 'May 2020 is not displayed');
|
unlike ($output, qr/May 2020/, 'May 2020 is not displayed');
|
||||||
qx{../src/task rc:cal.rc ls};
|
qx{../src/task rc:cal.rc ls 2>&1};
|
||||||
qx{../src/task rc:cal.rc 1-3 del};
|
qx{../src/task rc:cal.rc 1-3 del 2>&1};
|
||||||
qx{../src/task rc:cal.rc add due:20080408 three};
|
qx{../src/task rc:cal.rc add due:20080408 three 2>&1};
|
||||||
$output = qx{../src/task rc:cal.rc rc._forcecolor:on cal due};
|
$output = qx{../src/task rc:cal.rc rc._forcecolor:on cal due 2>&1};
|
||||||
like ($output, qr/April 2008/, 'April 2008 is displayed');
|
like ($output, qr/April 2008/, 'April 2008 is displayed');
|
||||||
like ($output, qr/41m 8/, 'Task 3 is color-coded overdue');
|
like ($output, qr/41m 8/, 'Task 3 is color-coded overdue');
|
||||||
like ($output, qr/37;100m19/, 'Saturday April 19, 2008 is color-coded');
|
like ($output, qr/37;100m19/, 'Saturday April 19, 2008 is color-coded');
|
||||||
|
@ -118,7 +118,7 @@ like ($output, qr/37;100m20/, 'Sunday April 20, 2008 is color-coded');
|
||||||
like ($output, qr/30;47m 1/, 'Weeknumbers are color-coded');
|
like ($output, qr/30;47m 1/, 'Weeknumbers are color-coded');
|
||||||
|
|
||||||
# task cal 2016
|
# task cal 2016
|
||||||
$output = qx{../src/task rc:cal.rc rc.weekstart:Monday cal 2016};
|
$output = qx{../src/task rc:cal.rc rc.weekstart:Monday cal 2016 2>&1};
|
||||||
unlike ($output, qr/2015/, 'Year 2015 is not displayed');
|
unlike ($output, qr/2015/, 'Year 2015 is not displayed');
|
||||||
unlike ($output, qr/2017/, 'Year 2017 is not displayed');
|
unlike ($output, qr/2017/, 'Year 2017 is not displayed');
|
||||||
like ($output, qr/January 2016/, 'January 2016 is displayed');
|
like ($output, qr/January 2016/, 'January 2016 is displayed');
|
||||||
|
@ -127,32 +127,32 @@ like ($output, qr/53 +1/, '2015 has 53 weeks (ISO)');
|
||||||
like ($output, qr/1 +4/, 'First week in 2016 starts with Mon Jan 4 (ISO)');
|
like ($output, qr/1 +4/, 'First week in 2016 starts with Mon Jan 4 (ISO)');
|
||||||
like ($output, qr/52 +26/, 'Last week in 2016 starts with Mon Dec 26 (ISO)');
|
like ($output, qr/52 +26/, 'Last week in 2016 starts with Mon Dec 26 (ISO)');
|
||||||
like ($output, qr/9 +29/, 'Leap year - Feb 29 is Monday in week 9 (ISO)');
|
like ($output, qr/9 +29/, 'Leap year - Feb 29 is Monday in week 9 (ISO)');
|
||||||
$output = qx{../src/task rc:cal.rc rc.weekstart:Sunday cal 2016};
|
$output = qx{../src/task rc:cal.rc rc.weekstart:Sunday cal 2016 2>&1};
|
||||||
like ($output, qr/1 +1/, 'First week in 2016 starts with Fri Jan 1 (US)');
|
like ($output, qr/1 +1/, 'First week in 2016 starts with Fri Jan 1 (US)');
|
||||||
like ($output, qr/53 +25/, 'Last week in 2016 starts with Sun Dec 25 (US)');
|
like ($output, qr/53 +25/, 'Last week in 2016 starts with Sun Dec 25 (US)');
|
||||||
$output = qx{../src/task rc:cal.rc rc.weekstart:Monday rc.displayweeknumber:off cal 2016};
|
$output = qx{../src/task rc:cal.rc rc.weekstart:Monday rc.displayweeknumber:off cal 2016 2>&1};
|
||||||
unlike ($output, qr/53/, 'Weeknumbers are not displayed');
|
unlike ($output, qr/53/, 'Weeknumbers are not displayed');
|
||||||
|
|
||||||
# task cal 4 2010
|
# task cal 4 2010
|
||||||
$output = qx{../src/task rc:cal.rc rc.monthsperline:1 cal 4 2010};
|
$output = qx{../src/task rc:cal.rc rc.monthsperline:1 cal 4 2010 2>&1};
|
||||||
unlike ($output, qr/March 2010/, 'March 2010 is not displayed');
|
unlike ($output, qr/March 2010/, 'March 2010 is not displayed');
|
||||||
like ($output, qr/April 2010/, 'April 2010 is displayed');
|
like ($output, qr/April 2010/, 'April 2010 is displayed');
|
||||||
unlike ($output, qr/May 2010/, 'May 2010 is not displayed');
|
unlike ($output, qr/May 2010/, 'May 2010 is not displayed');
|
||||||
|
|
||||||
# calendar offsets
|
# calendar offsets
|
||||||
$output = qx{../src/task rc:cal.rc rc.calendar.offset:on rc.monthsperline:1 cal 1 2011};
|
$output = qx{../src/task rc:cal.rc rc.calendar.offset:on rc.monthsperline:1 cal 1 2011 2>&1};
|
||||||
unlike ($output, qr/November 2010/, 'November 2010 is not displayed');
|
unlike ($output, qr/November 2010/, 'November 2010 is not displayed');
|
||||||
like ($output, qr/December 2010/, 'December 2010 is displayed');
|
like ($output, qr/December 2010/, 'December 2010 is displayed');
|
||||||
unlike ($output, qr/January 2011/, 'January 2011 is not displayed');
|
unlike ($output, qr/January 2011/, 'January 2011 is not displayed');
|
||||||
$output = qx{../src/task rc:cal.rc rc.calendar.offset:on rc.calendar.offset.value:2 rc.monthsperline:1 cal 1 2011};
|
$output = qx{../src/task rc:cal.rc rc.calendar.offset:on rc.calendar.offset.value:2 rc.monthsperline:1 cal 1 2011 2>&1};
|
||||||
unlike ($output, qr/January 2011/, 'January 2011 is not displayed');
|
unlike ($output, qr/January 2011/, 'January 2011 is not displayed');
|
||||||
unlike ($output, qr/February 2011/, 'February 2011 is not displayed');
|
unlike ($output, qr/February 2011/, 'February 2011 is not displayed');
|
||||||
like ($output, qr/March 2011/, 'March 2011 is displayed');
|
like ($output, qr/March 2011/, 'March 2011 is displayed');
|
||||||
unlike ($output, qr/April 2011/, 'April 2011 is not displayed');
|
unlike ($output, qr/April 2011/, 'April 2011 is not displayed');
|
||||||
$output = qx{../src/task rc:cal.rc rc.calendar.offset:on rc.calendar.offset.value:-12 rc.monthsperline:1 cal};
|
$output = qx{../src/task rc:cal.rc rc.calendar.offset:on rc.calendar.offset.value:-12 rc.monthsperline:1 cal 2>&1};
|
||||||
like ($output, qr/$month\S*?\s+?$prevyear/, 'Current month and year ahead are displayed');
|
like ($output, qr/$month\S*?\s+?$prevyear/, 'Current month and year ahead are displayed');
|
||||||
unlike ($output, qr/$month\S*?\s+?$year/, 'Current month and year are not displayed');
|
unlike ($output, qr/$month\S*?\s+?$year/, 'Current month and year are not displayed');
|
||||||
$output = qx{../src/task rc:cal.rc rc.calendar.offset:on rc.calendar.offset.value:12 rc.monthsperline:1 cal};
|
$output = qx{../src/task rc:cal.rc rc.calendar.offset:on rc.calendar.offset.value:12 rc.monthsperline:1 cal 2>&1};
|
||||||
unlike ($output, qr/$month\S*?\s+?$year/, 'Current month and year are not displayed');
|
unlike ($output, qr/$month\S*?\s+?$year/, 'Current month and year are not displayed');
|
||||||
like ($output, qr/$month\S*?\s+?$nextyear/, 'Current month and year ahead are displayed');
|
like ($output, qr/$month\S*?\s+?$nextyear/, 'Current month and year ahead are displayed');
|
||||||
|
|
||||||
|
@ -190,19 +190,19 @@ if (open my $fh, '>', 'details.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# task calendar details
|
# task calendar details
|
||||||
qx{../src/task rc:details.rc add due:20150105 one};
|
qx{../src/task rc:details.rc add due:20150105 one 2>&1};
|
||||||
qx{../src/task rc:details.rc add due:20150110 two};
|
qx{../src/task rc:details.rc add due:20150110 two 2>&1};
|
||||||
qx{../src/task rc:details.rc add due:20150210 three};
|
qx{../src/task rc:details.rc add due:20150210 three 2>&1};
|
||||||
qx{../src/task rc:details.rc add due:20150410 four};
|
qx{../src/task rc:details.rc add due:20150410 four 2>&1};
|
||||||
qx{../src/task rc:details.rc add due:20151225 five};
|
qx{../src/task rc:details.rc add due:20151225 five 2>&1};
|
||||||
qx{../src/task rc:details.rc add due:20141231 six};
|
qx{../src/task rc:details.rc add due:20141231 six 2>&1};
|
||||||
qx{../src/task rc:details.rc add due:20160101 seven};
|
qx{../src/task rc:details.rc add due:20160101 seven 2>&1};
|
||||||
qx{../src/task rc:details.rc add due:20081231 eight};
|
qx{../src/task rc:details.rc add due:20081231 eight 2>&1};
|
||||||
|
|
||||||
$output = qx{../src/task rc:details.rc rc.calendar.legend:no cal};
|
$output = qx{../src/task rc:details.rc rc.calendar.legend:no cal 2>&1};
|
||||||
unlike ($output, qr/Legend:/, 'Legend is not displayed');
|
unlike ($output, qr/Legend:/, 'Legend is not displayed');
|
||||||
|
|
||||||
$output = qx{../src/task rc:details.rc cal rc.monthsperline:3 1 2015};
|
$output = qx{../src/task rc:details.rc cal rc.monthsperline:3 1 2015 2>&1};
|
||||||
like ($output, qr/January 2015/, 'January 2015 is displayed');
|
like ($output, qr/January 2015/, 'January 2015 is displayed');
|
||||||
like ($output, qr/20150105/, 'Due date 20150105 is displayed');
|
like ($output, qr/20150105/, 'Due date 20150105 is displayed');
|
||||||
like ($output, qr/20150110/, 'Due date 20150110 is displayed');
|
like ($output, qr/20150110/, 'Due date 20150110 is displayed');
|
||||||
|
@ -211,12 +211,12 @@ unlike ($output, qr/20141231/, 'Due date 20141231 is not displayed');
|
||||||
unlike ($output, qr/20150410/, 'Due date 20150410 is not displayed');
|
unlike ($output, qr/20150410/, 'Due date 20150410 is not displayed');
|
||||||
like ($output, qr/3 tasks/, '3 due tasks are displayed');
|
like ($output, qr/3 tasks/, '3 due tasks are displayed');
|
||||||
|
|
||||||
$output = qx{../src/task rc:details.rc cal due};
|
$output = qx{../src/task rc:details.rc cal due 2>&1};
|
||||||
like ($output, qr/December 2008/, 'December 2008 is displayed');
|
like ($output, qr/December 2008/, 'December 2008 is displayed');
|
||||||
like ($output, qr/20081231/, 'Due date 20081231 is displayed');
|
like ($output, qr/20081231/, 'Due date 20081231 is displayed');
|
||||||
like ($output, qr/1 task/, '1 due task is displayed');
|
like ($output, qr/1 task/, '1 due task is displayed');
|
||||||
|
|
||||||
$output = qx{../src/task rc:details.rc cal 2015};
|
$output = qx{../src/task rc:details.rc cal 2015 2>&1};
|
||||||
like ($output, qr/January 2015/, 'January 2015 is displayed');
|
like ($output, qr/January 2015/, 'January 2015 is displayed');
|
||||||
like ($output, qr/December 2015/, 'December 2015 is displayed');
|
like ($output, qr/December 2015/, 'December 2015 is displayed');
|
||||||
unlike ($output, qr/20141231/, 'Due date 20141231 is not displayed');
|
unlike ($output, qr/20141231/, 'Due date 20141231 is not displayed');
|
||||||
|
@ -235,13 +235,13 @@ if ( $mon <= 9)
|
||||||
}
|
}
|
||||||
my $duedate = $year.$mon.$day;
|
my $duedate = $year.$mon.$day;
|
||||||
|
|
||||||
qx{../src/task rc:details.rc add due:$duedate rc.monthsperline:1 nine};
|
qx{../src/task rc:details.rc add due:$duedate rc.monthsperline:1 nine 2>&1};
|
||||||
$output = qx{../src/task rc:details.rc cal};
|
$output = qx{../src/task rc:details.rc cal 2>&1};
|
||||||
like ($output, qr/$month\S*?\s+?$year/, 'Current month and year are displayed');
|
like ($output, qr/$month\S*?\s+?$year/, 'Current month and year are displayed');
|
||||||
like ($output, qr/$duedate/, 'Due date on current day is displayed');
|
like ($output, qr/$duedate/, 'Due date on current day is displayed');
|
||||||
like ($output, qr/1 task/, '1 due task is displayed');
|
like ($output, qr/1 task/, '1 due task is displayed');
|
||||||
|
|
||||||
$output = qx{../src/task rc:details.rc cal rc.monthsperline:1 1 2015};
|
$output = qx{../src/task rc:details.rc cal rc.monthsperline:1 1 2015 2>&1};
|
||||||
like ($output, qr/Date/, 'Word Date is displayed');
|
like ($output, qr/Date/, 'Word Date is displayed');
|
||||||
like ($output, qr/Holiday/, 'Word Holiday is displayed');
|
like ($output, qr/Holiday/, 'Word Holiday is displayed');
|
||||||
like ($output, qr/20150101/, 'Holiday 20150101 is displayed');
|
like ($output, qr/20150101/, 'Holiday 20150101 is displayed');
|
||||||
|
@ -251,7 +251,7 @@ like ($output, qr/AAAA/, 'Holiday name AAAA is displayed');
|
||||||
like ($output, qr/BBBBBB/, 'Holiday name BBBBBB is displayed');
|
like ($output, qr/BBBBBB/, 'Holiday name BBBBBB is displayed');
|
||||||
like ($output, qr/åäö/, 'Holiday name åäö is displayed');
|
like ($output, qr/åäö/, 'Holiday name åäö is displayed');
|
||||||
|
|
||||||
$output = qx{../src/task rc:details.rc cal rc._forcecolor:on rc.monthsperline:1 rc.calendar.details:sparse rc.calendar.holidays:sparse 1 2015};
|
$output = qx{../src/task rc:details.rc cal rc._forcecolor:on rc.monthsperline:1 rc.calendar.details:sparse rc.calendar.holidays:sparse 1 2015 2>&1};
|
||||||
unlike ($output, qr/Date/, 'Word Date is not displayed');
|
unlike ($output, qr/Date/, 'Word Date is not displayed');
|
||||||
unlike ($output, qr/Holiday/, 'Word Holiday is not displayed');
|
unlike ($output, qr/Holiday/, 'Word Holiday is not displayed');
|
||||||
like ($output, qr/30;103m 1/, 'Holiday AAAA is color-coded');
|
like ($output, qr/30;103m 1/, 'Holiday AAAA is color-coded');
|
||||||
|
|
|
@ -39,83 +39,83 @@ if (open my $fh, '>', 'caseless.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Attempt case-sensitive and case-insensitive substitutions and filters.
|
# Attempt case-sensitive and case-insensitive substitutions and filters.
|
||||||
qx{../src/task rc:caseless.rc add one two three};
|
qx{../src/task rc:caseless.rc add one two three 2>&1};
|
||||||
qx{../src/task rc:caseless.rc 1 annotate four five six};
|
qx{../src/task rc:caseless.rc 1 annotate four five six 2>&1};
|
||||||
|
|
||||||
# Description substitution.
|
# Description substitution.
|
||||||
# 2
|
# 2
|
||||||
qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes 1 modify /One/ONE/};
|
qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes 1 modify /One/ONE/ 2>&1};
|
||||||
my $output = qx{../src/task rc:caseless.rc info 1};
|
my $output = qx{../src/task rc:caseless.rc info 1 2>&1};
|
||||||
unlike ($output, qr/One two three/, 'one two three\nfour five six -> /One/ONE/ = fail');
|
unlike ($output, qr/One two three/, 'one two three\nfour five six -> /One/ONE/ = fail');
|
||||||
|
|
||||||
# 3
|
# 3
|
||||||
qx{../src/task rc:caseless.rc rc.search.case.sensitive:no 1 modify /One/ONE/};
|
qx{../src/task rc:caseless.rc rc.search.case.sensitive:no 1 modify /One/ONE/ 2>&1};
|
||||||
$output = qx{../src/task rc:caseless.rc info 1};
|
$output = qx{../src/task rc:caseless.rc info 1 2>&1};
|
||||||
like ($output, qr/ONE two three/, 'one two three\nfour five six -> /One/ONE/ = caseless succeed');
|
like ($output, qr/ONE two three/, 'one two three\nfour five six -> /One/ONE/ = caseless succeed');
|
||||||
|
|
||||||
# 4
|
# 4
|
||||||
qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes 1 modify /one/One/};
|
qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes 1 modify /one/One/ 2>&1};
|
||||||
$output = qx{../src/task rc:caseless.rc info 1};
|
$output = qx{../src/task rc:caseless.rc info 1 2>&1};
|
||||||
unlike ($output, qr/One two three/, 'ONE two three\nfour five six -> /one/ONE/ = fail');
|
unlike ($output, qr/One two three/, 'ONE two three\nfour five six -> /one/ONE/ = fail');
|
||||||
|
|
||||||
# 5
|
# 5
|
||||||
qx{../src/task rc:caseless.rc rc.search.case.sensitive:no 1 modify /one/one/};
|
qx{../src/task rc:caseless.rc rc.search.case.sensitive:no 1 modify /one/one/ 2>&1};
|
||||||
$output = qx{../src/task rc:caseless.rc info 1};
|
$output = qx{../src/task rc:caseless.rc info 1 2>&1};
|
||||||
like ($output, qr/one two three/, 'ONE two three\nfour five six -> /one/one/ = caseless succeed');
|
like ($output, qr/one two three/, 'ONE two three\nfour five six -> /one/one/ = caseless succeed');
|
||||||
|
|
||||||
# Annotation substitution.
|
# Annotation substitution.
|
||||||
# 6
|
# 6
|
||||||
qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes 1 modify /Five/FIVE/};
|
qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes 1 modify /Five/FIVE/ 2>&1};
|
||||||
$output = qx{../src/task rc:caseless.rc info 1};
|
$output = qx{../src/task rc:caseless.rc info 1 2>&1};
|
||||||
unlike ($output, qr/four FIVE six/, 'one two three\nfour five six -> /Five/FIVE/ = fail');
|
unlike ($output, qr/four FIVE six/, 'one two three\nfour five six -> /Five/FIVE/ = fail');
|
||||||
|
|
||||||
# 7
|
# 7
|
||||||
qx{../src/task rc:caseless.rc rc.search.case.sensitive:no 1 modify /Five/FIVE/};
|
qx{../src/task rc:caseless.rc rc.search.case.sensitive:no 1 modify /Five/FIVE/ 2>&1};
|
||||||
$output = qx{../src/task rc:caseless.rc info 1};
|
$output = qx{../src/task rc:caseless.rc info 1 2>&1};
|
||||||
like ($output, qr/four FIVE six/, 'one two three\nfour five six -> /Five/FIVE/ = caseless succeed');
|
like ($output, qr/four FIVE six/, 'one two three\nfour five six -> /Five/FIVE/ = caseless succeed');
|
||||||
|
|
||||||
# 8
|
# 8
|
||||||
qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes 1 modify /five/Five/};
|
qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes 1 modify /five/Five/ 2>&1};
|
||||||
$output = qx{../src/task rc:caseless.rc info 1};
|
$output = qx{../src/task rc:caseless.rc info 1 2>&1};
|
||||||
unlike ($output, qr/four Five six/, 'one two three\nfour FIVE six -> /five/Five/ = fail');
|
unlike ($output, qr/four Five six/, 'one two three\nfour FIVE six -> /five/Five/ = fail');
|
||||||
|
|
||||||
# 9
|
# 9
|
||||||
qx{../src/task rc:caseless.rc rc.search.case.sensitive:no 1 modify /five/five/};
|
qx{../src/task rc:caseless.rc rc.search.case.sensitive:no 1 modify /five/five/ 2>&1};
|
||||||
$output = qx{../src/task rc:caseless.rc info 1};
|
$output = qx{../src/task rc:caseless.rc info 1 2>&1};
|
||||||
like ($output, qr/four five six/, 'one two three\nfour FIVE six -> /five/five/ = caseless succeed');
|
like ($output, qr/four five six/, 'one two three\nfour FIVE six -> /five/five/ = caseless succeed');
|
||||||
|
|
||||||
# Description filter.
|
# Description filter.
|
||||||
# 10
|
# 10
|
||||||
$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes ls One};
|
$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes ls One 2>&1};
|
||||||
unlike ($output, qr/one two three/, 'one two three\nfour five six -> ls One = fail');
|
unlike ($output, qr/one two three/, 'one two three\nfour five six -> ls One = fail');
|
||||||
|
|
||||||
# 11
|
# 11
|
||||||
$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:no ls One};
|
$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:no ls One 2>&1};
|
||||||
like ($output, qr/one two three/, 'one two three\nfour five six -> ls One caseless = succeed');
|
like ($output, qr/one two three/, 'one two three\nfour five six -> ls One caseless = succeed');
|
||||||
|
|
||||||
# 12
|
# 12
|
||||||
$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes ls Five};
|
$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes ls Five 2>&1};
|
||||||
unlike ($output, qr/four five six/, 'one two three\nfour five six -> ls Five = fail');
|
unlike ($output, qr/four five six/, 'one two three\nfour five six -> ls Five = fail');
|
||||||
|
|
||||||
# 13
|
# 13
|
||||||
$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:no ls Five};
|
$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:no ls Five 2>&1};
|
||||||
like ($output, qr/four five six/, 'one two three\nfour five six -> ls Five caseless = succeed');
|
like ($output, qr/four five six/, 'one two three\nfour five six -> ls Five caseless = succeed');
|
||||||
|
|
||||||
# Annotation filter.
|
# Annotation filter.
|
||||||
# 14
|
# 14
|
||||||
$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes ls description.contains:Three};
|
$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes ls description.contains:Three 2>&1};
|
||||||
unlike ($output, qr/one two three/, 'one two three\nfour five six -> ls description.contains:Three = fail');
|
unlike ($output, qr/one two three/, 'one two three\nfour five six -> ls description.contains:Three = fail');
|
||||||
|
|
||||||
# 15
|
# 15
|
||||||
$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:no ls description.contains:Three};
|
$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:no ls description.contains:Three 2>&1};
|
||||||
like ($output, qr/one two three/, 'one two three\nfour five six -> ls description.contains:Three caseless = succeed');
|
like ($output, qr/one two three/, 'one two three\nfour five six -> ls description.contains:Three caseless = succeed');
|
||||||
|
|
||||||
# 16
|
# 16
|
||||||
$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes ls description.contains:Six};
|
$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes ls description.contains:Six 2>&1};
|
||||||
unlike ($output, qr/four five six/, 'one two three\nfour five six -> ls description.contains:Six = fail');
|
unlike ($output, qr/four five six/, 'one two three\nfour five six -> ls description.contains:Six = fail');
|
||||||
|
|
||||||
# 17
|
# 17
|
||||||
$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:no ls description.contains:Six};
|
$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:no ls description.contains:Six 2>&1};
|
||||||
like ($output, qr/four five six/, 'one two three\nfour five six -> ls description.contains:Six caseless = succeed');
|
like ($output, qr/four five six/, 'one two three\nfour five six -> ls description.contains:Six caseless = succeed');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -41,10 +41,10 @@ if (open my $fh, '>', 'color.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test the add command.
|
# Test the add command.
|
||||||
qx{../src/task rc:color.rc add nothing};
|
qx{../src/task rc:color.rc add nothing 2>&1};
|
||||||
qx{../src/task rc:color.rc add red};
|
qx{../src/task rc:color.rc add red 2>&1};
|
||||||
qx{../src/task rc:color.rc 2 start};
|
qx{../src/task rc:color.rc 2 start 2>&1};
|
||||||
my $output = qx{../src/task rc:color.rc list};
|
my $output = qx{../src/task rc:color.rc list 2>&1};
|
||||||
|
|
||||||
like ($output, qr/ (?!<\033\[\d\dm) .* nothing .* (?!>\033\[0m) /x, 'none');
|
like ($output, qr/ (?!<\033\[\d\dm) .* nothing .* (?!>\033\[0m) /x, 'none');
|
||||||
like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.active');
|
like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.active');
|
||||||
|
|
|
@ -42,10 +42,10 @@ if (open my $fh, '>', 'color.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test the add command.
|
# Test the add command.
|
||||||
qx{../src/task rc:color.rc add red};
|
qx{../src/task rc:color.rc add red 2>&1};
|
||||||
qx{../src/task rc:color.rc add nothing};
|
qx{../src/task rc:color.rc add nothing 2>&1};
|
||||||
qx{../src/task rc:color.rc 1 modify depends:2};
|
qx{../src/task rc:color.rc 1 modify depends:2 2>&1};
|
||||||
my $output = qx{../src/task rc:color.rc list};
|
my $output = qx{../src/task rc:color.rc list 2>&1};
|
||||||
|
|
||||||
like ($output, qr/ (?!<\033\[\d\dm) .* nothing .* (?!>\033\[0m) /x, 'none');
|
like ($output, qr/ (?!<\033\[\d\dm) .* nothing .* (?!>\033\[0m) /x, 'none');
|
||||||
like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.blocked');
|
like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.blocked');
|
||||||
|
|
|
@ -41,7 +41,7 @@ if (open my $fh, '>', 'color.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test the add command.
|
# Test the add command.
|
||||||
my $output = qx{../src/task rc:color.rc show};
|
my $output = qx{../src/task rc:color.rc show 2>&1};
|
||||||
like ($output, qr/that use deprecated underscores/ms, 'Deprecated color detected');
|
like ($output, qr/that use deprecated underscores/ms, 'Deprecated color detected');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
|
@ -41,8 +41,8 @@ if (open my $fh, '>', 'color.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test the add command.
|
# Test the add command.
|
||||||
qx{../src/task rc:color.rc add priority:H red};
|
qx{../src/task rc:color.rc add priority:H red 2>&1};
|
||||||
my $output = qx{../src/task rc:color.rc list};
|
my $output = qx{../src/task rc:color.rc list 2>&1};
|
||||||
|
|
||||||
like ($output, qr/red/, 'color.disable - found red');
|
like ($output, qr/red/, 'color.disable - found red');
|
||||||
unlike ($output, qr/\033\[31m/, 'color.disable - no color red');
|
unlike ($output, qr/\033\[31m/, 'color.disable - no color red');
|
||||||
|
|
|
@ -41,9 +41,9 @@ if (open my $fh, '>', 'color.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test the add command.
|
# Test the add command.
|
||||||
qx{../src/task rc:color.rc add due:12/31/2037 nothing};
|
qx{../src/task rc:color.rc add due:12/31/2037 nothing 2>&1};
|
||||||
qx{../src/task rc:color.rc add due:tomorrow red};
|
qx{../src/task rc:color.rc add due:tomorrow red 2>&1};
|
||||||
my $output = qx{../src/task rc:color.rc list};
|
my $output = qx{../src/task rc:color.rc list 2>&1};
|
||||||
|
|
||||||
like ($output, qr/ (?!<\033\[\d\dm) \d{1,2}\/\d{1,2}\/\d{4} (?!>\033\[0m) .* nothing /x, 'none');
|
like ($output, qr/ (?!<\033\[\d\dm) \d{1,2}\/\d{1,2}\/\d{4} (?!>\033\[0m) .* nothing /x, 'none');
|
||||||
like ($output, qr/ \033\[31m .* red .* \033\[0m/x, 'color.due');
|
like ($output, qr/ \033\[31m .* red .* \033\[0m/x, 'color.due');
|
||||||
|
|
|
@ -41,9 +41,9 @@ if (open my $fh, '>', 'color.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test the add command.
|
# Test the add command.
|
||||||
qx{../src/task rc:color.rc add due:12/31/2037 nothing};
|
qx{../src/task rc:color.rc add due:12/31/2037 nothing 2>&1};
|
||||||
qx{../src/task rc:color.rc add due:5minutes red};
|
qx{../src/task rc:color.rc add due:5minutes red 2>&1};
|
||||||
my $output = qx{../src/task rc:color.rc list};
|
my $output = qx{../src/task rc:color.rc list 2>&1};
|
||||||
|
|
||||||
like ($output, qr/ (?!<\033\[\d\dm) \d{1,2}\/\d{1,2}\/\d{4} (?!>\033\[0m) .* nothing /x, 'none');
|
like ($output, qr/ (?!<\033\[\d\dm) \d{1,2}\/\d{1,2}\/\d{4} (?!>\033\[0m) .* nothing /x, 'none');
|
||||||
like ($output, qr/ (?:\033\[31m|\033\[38;5;9m) .* red .* \033\[0m/x, 'color.due.today');
|
like ($output, qr/ (?:\033\[31m|\033\[38;5;9m) .* red .* \033\[0m/x, 'color.due.today');
|
||||||
|
|
|
@ -46,12 +46,12 @@ if (open my $fh, '>', 'color.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test the add command.
|
# Test the add command.
|
||||||
qx{../src/task rc:color.rc add nothing};
|
qx{../src/task rc:color.rc add nothing 2>&1};
|
||||||
qx{../src/task rc:color.rc add red};
|
qx{../src/task rc:color.rc add red 2>&1};
|
||||||
qx{../src/task rc:color.rc add green};
|
qx{../src/task rc:color.rc add green 2>&1};
|
||||||
qx{../src/task rc:color.rc add -- annotation};
|
qx{../src/task rc:color.rc add -- annotation 2>&1};
|
||||||
qx{../src/task rc:color.rc 4 annotate yellow};
|
qx{../src/task rc:color.rc 4 annotate yellow 2>&1};
|
||||||
my $output = qx{../src/task rc:color.rc list};
|
my $output = qx{../src/task rc:color.rc list 2>&1};
|
||||||
|
|
||||||
like ($output, qr/ (?!<\033\[\d\dm) .* nothing .* (?!>\033\[0m) /x, 'none');
|
like ($output, qr/ (?!<\033\[\d\dm) .* nothing .* (?!>\033\[0m) /x, 'none');
|
||||||
like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.keyword.red');
|
like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.keyword.red');
|
||||||
|
|
|
@ -41,9 +41,9 @@ if (open my $fh, '>', 'color.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test the add command.
|
# Test the add command.
|
||||||
qx{../src/task rc:color.rc add due:tomorrow nothing};
|
qx{../src/task rc:color.rc add due:tomorrow nothing 2>&1};
|
||||||
qx{../src/task rc:color.rc add due:yesterday red};
|
qx{../src/task rc:color.rc add due:yesterday red 2>&1};
|
||||||
my $output = qx{../src/task rc:color.rc list};
|
my $output = qx{../src/task rc:color.rc list 2>&1};
|
||||||
|
|
||||||
like ($output, qr/ (?!<\033\[\d\dm) \d{1,2}\/\d{1,2}\/\d{4} (?!>\033\[0m) .* nothing /x, 'none');
|
like ($output, qr/ (?!<\033\[\d\dm) \d{1,2}\/\d{1,2}\/\d{4} (?!>\033\[0m) .* nothing /x, 'none');
|
||||||
like ($output, qr/ \033\[31m .* red .* \033\[0m/x, 'color.overdue');
|
like ($output, qr/ \033\[31m .* red .* \033\[0m/x, 'color.overdue');
|
||||||
|
|
|
@ -45,11 +45,11 @@ if (open my $fh, '>', 'color.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test the add command.
|
# Test the add command.
|
||||||
qx{../src/task rc:color.rc add priority:H red};
|
qx{../src/task rc:color.rc add priority:H red 2>&1};
|
||||||
qx{../src/task rc:color.rc add priority:M green};
|
qx{../src/task rc:color.rc add priority:M green 2>&1};
|
||||||
qx{../src/task rc:color.rc add priority:L blue};
|
qx{../src/task rc:color.rc add priority:L blue 2>&1};
|
||||||
qx{../src/task rc:color.rc add yellow};
|
qx{../src/task rc:color.rc add yellow 2>&1};
|
||||||
my $output = qx{../src/task rc:color.rc list};
|
my $output = qx{../src/task rc:color.rc list 2>&1};
|
||||||
|
|
||||||
like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.pri.H');
|
like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.pri.H');
|
||||||
like ($output, qr/ \033\[32m .* green .* \033\[0m /x, 'color.pri.M');
|
like ($output, qr/ \033\[32m .* green .* \033\[0m /x, 'color.pri.M');
|
||||||
|
|
|
@ -43,9 +43,9 @@ if (open my $fh, '>', 'color.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test the add command.
|
# Test the add command.
|
||||||
qx{../src/task rc:color.rc add nothing};
|
qx{../src/task rc:color.rc add nothing 2>&1};
|
||||||
qx{../src/task rc:color.rc add project:x red};
|
qx{../src/task rc:color.rc add project:x red 2>&1};
|
||||||
my $output = qx{../src/task rc:color.rc list};
|
my $output = qx{../src/task rc:color.rc list 2>&1};
|
||||||
|
|
||||||
like ($output, qr/ \033\[32m .* nothing .* \033\[0m /x, 'color.project.none');
|
like ($output, qr/ \033\[32m .* nothing .* \033\[0m /x, 'color.project.none');
|
||||||
like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.project.red');
|
like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.project.red');
|
||||||
|
|
|
@ -42,9 +42,9 @@ if (open my $fh, '>', 'color.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test the add command.
|
# Test the add command.
|
||||||
qx{../src/task rc:color.rc add nothing};
|
qx{../src/task rc:color.rc add nothing 2>&1};
|
||||||
qx{../src/task rc:color.rc add due:tomorrow recur:1w red};
|
qx{../src/task rc:color.rc add due:tomorrow recur:1w red 2>&1};
|
||||||
my $output = qx{../src/task rc:color.rc list};
|
my $output = qx{../src/task rc:color.rc list 2>&1};
|
||||||
|
|
||||||
like ($output, qr/ (?!<\033\[\d\dm) .* nothing .* (?!>\033\[0m) /x, 'none');
|
like ($output, qr/ (?!<\033\[\d\dm) .* nothing .* (?!>\033\[0m) /x, 'none');
|
||||||
like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.recurring');
|
like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.recurring');
|
||||||
|
|
|
@ -45,10 +45,10 @@ if (open my $fh, '>', 'color.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test the add command.
|
# Test the add command.
|
||||||
qx{../src/task rc:color.rc add nothing};
|
qx{../src/task rc:color.rc add nothing 2>&1};
|
||||||
qx{../src/task rc:color.rc add +red red};
|
qx{../src/task rc:color.rc add +red red 2>&1};
|
||||||
qx{../src/task rc:color.rc add +green green};
|
qx{../src/task rc:color.rc add +green green 2>&1};
|
||||||
my $output = qx{../src/task rc:color.rc list};
|
my $output = qx{../src/task rc:color.rc list 2>&1};
|
||||||
|
|
||||||
like ($output, qr/ \033\[33m .* nothing .* \033\[0m /x, 'color.tag.none');
|
like ($output, qr/ \033\[33m .* nothing .* \033\[0m /x, 'color.tag.none');
|
||||||
like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.tag.red');
|
like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.tag.red');
|
||||||
|
|
|
@ -45,9 +45,9 @@ if (open my $fh, '>', 'color.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test the add command.
|
# Test the add command.
|
||||||
qx{../src/task rc:color.rc add nothing};
|
qx{../src/task rc:color.rc add nothing 2>&1};
|
||||||
qx{../src/task rc:color.rc add +tag red};
|
qx{../src/task rc:color.rc add +tag red 2>&1};
|
||||||
my $output = qx{../src/task rc:color.rc list};
|
my $output = qx{../src/task rc:color.rc list 2>&1};
|
||||||
|
|
||||||
like ($output, qr/ (?!<\033\[\d\dm) .* nothing .* (?!>\033\[0m) /x, 'none');
|
like ($output, qr/ (?!<\033\[\d\dm) .* nothing .* (?!>\033\[0m) /x, 'none');
|
||||||
like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.tagged');
|
like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.tagged');
|
||||||
|
|
|
@ -40,13 +40,13 @@ if (open my $fh, '>', 'completed.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add two tasks, mark 1 as done, the other as deleted.
|
# Add two tasks, mark 1 as done, the other as deleted.
|
||||||
qx{../src/task rc:completed.rc add one};
|
qx{../src/task rc:completed.rc add one 2>&1};
|
||||||
qx{../src/task rc:completed.rc add two};
|
qx{../src/task rc:completed.rc add two 2>&1};
|
||||||
qx{../src/task rc:completed.rc 1 done};
|
qx{../src/task rc:completed.rc 1 done 2>&1};
|
||||||
qx{../src/task rc:completed.rc 2 delete};
|
qx{../src/task rc:completed.rc 2 delete 2>&1};
|
||||||
|
|
||||||
# Generate completed report.
|
# Generate completed report.
|
||||||
my $output = qx{../src/task rc:completed.rc completed};
|
my $output = qx{../src/task rc:completed.rc completed 2>&1};
|
||||||
like ($output, qr/one/, 'one -> completed');
|
like ($output, qr/one/, 'one -> completed');
|
||||||
unlike ($output, qr/two/, 'two -> deleted');
|
unlike ($output, qr/two/, 'two -> deleted');
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ if (open my $fh, '>', 'obsolete.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test the add command.
|
# Test the add command.
|
||||||
my $output = qx{../src/task rc:obsolete.rc show};
|
my $output = qx{../src/task rc:obsolete.rc show 2>&1};
|
||||||
|
|
||||||
like ($output, qr/Your .taskrc file contains these unrecognized variables:\n/,
|
like ($output, qr/Your .taskrc file contains these unrecognized variables:\n/,
|
||||||
'unsupported configuration variable');
|
'unsupported configuration variable');
|
||||||
|
|
|
@ -47,52 +47,52 @@ if (open my $fh, '>', 'response.txt')
|
||||||
ok (-r 'response.txt', 'Created response.txt');
|
ok (-r 'response.txt', 'Created response.txt');
|
||||||
}
|
}
|
||||||
|
|
||||||
qx{../src/task rc:confirm.rc add foo} for 1..10;
|
qx{../src/task rc:confirm.rc add foo 2>&1} for 1..10;
|
||||||
|
|
||||||
# Test the various forms of "Yes".
|
# Test the various forms of "Yes".
|
||||||
my $output = qx{echo "Yes" | ../src/task rc:confirm.rc 1 del};
|
my $output = qx{echo "Yes" | ../src/task rc:confirm.rc 1 del 2>&1};
|
||||||
like ($output, qr/Permanently delete task 1 'foo'\? \(yes\/no\)/, 'confirmation - Yes works');
|
like ($output, qr/Permanently delete task 1 'foo'\? \(yes\/no\)/, 'confirmation - Yes works');
|
||||||
unlike ($output, qr/Task not deleted\./, 'confirmation - Yes works');
|
unlike ($output, qr/Task not deleted\./, 'confirmation - Yes works');
|
||||||
|
|
||||||
$output = qx{echo "ye" | ../src/task rc:confirm.rc 2 del};
|
$output = qx{echo "ye" | ../src/task rc:confirm.rc 2 del 2>&1};
|
||||||
like ($output, qr/Permanently delete task 2 'foo'\? \(yes\/no\)/, 'confirmation - ye works');
|
like ($output, qr/Permanently delete task 2 'foo'\? \(yes\/no\)/, 'confirmation - ye works');
|
||||||
unlike ($output, qr/Task not deleted\./, 'confirmation - ye works');
|
unlike ($output, qr/Task not deleted\./, 'confirmation - ye works');
|
||||||
|
|
||||||
$output = qx{echo "y" | ../src/task rc:confirm.rc 3 del};
|
$output = qx{echo "y" | ../src/task rc:confirm.rc 3 del 2>&1};
|
||||||
like ($output, qr/Permanently delete task 3 'foo'\? \(yes\/no\)/, 'confirmation - y works');
|
like ($output, qr/Permanently delete task 3 'foo'\? \(yes\/no\)/, 'confirmation - y works');
|
||||||
unlike ($output, qr/Task not deleted\./, 'confirmation - y works');
|
unlike ($output, qr/Task not deleted\./, 'confirmation - y works');
|
||||||
|
|
||||||
$output = qx{echo "YES" | ../src/task rc:confirm.rc 4 del};
|
$output = qx{echo "YES" | ../src/task rc:confirm.rc 4 del 2>&1};
|
||||||
like ($output, qr/Permanently delete task 4 'foo'\? \(yes\/no\)/, 'confirmation - YES works');
|
like ($output, qr/Permanently delete task 4 'foo'\? \(yes\/no\)/, 'confirmation - YES works');
|
||||||
unlike ($output, qr/Task not deleted\./, 'confirmation - YES works'); # 10
|
unlike ($output, qr/Task not deleted\./, 'confirmation - YES works'); # 10
|
||||||
|
|
||||||
$output = qx{echo "YE" | ../src/task rc:confirm.rc 5 del};
|
$output = qx{echo "YE" | ../src/task rc:confirm.rc 5 del 2>&1};
|
||||||
like ($output, qr/Permanently delete task 5 'foo'\? \(yes\/no\)/, 'confirmation - YE works');
|
like ($output, qr/Permanently delete task 5 'foo'\? \(yes\/no\)/, 'confirmation - YE works');
|
||||||
unlike ($output, qr/Task not deleted\./, 'confirmation - YE works');
|
unlike ($output, qr/Task not deleted\./, 'confirmation - YE works');
|
||||||
|
|
||||||
$output = qx{echo "Y" | ../src/task rc:confirm.rc 6 del};
|
$output = qx{echo "Y" | ../src/task rc:confirm.rc 6 del 2>&1};
|
||||||
like ($output, qr/Permanently delete task 6 'foo'\? \(yes\/no\)/, 'confirmation - Y works');
|
like ($output, qr/Permanently delete task 6 'foo'\? \(yes\/no\)/, 'confirmation - Y works');
|
||||||
unlike ($output, qr/Task not deleted\./, 'confirmation - Y works');
|
unlike ($output, qr/Task not deleted\./, 'confirmation - Y works');
|
||||||
|
|
||||||
# Test the various forms of "no".
|
# Test the various forms of "no".
|
||||||
$output = qx{echo "no" | ../src/task rc:confirm.rc 7 del};
|
$output = qx{echo "no" | ../src/task rc:confirm.rc 7 del 2>&1};
|
||||||
like ($output, qr/Permanently delete task 7 'foo'\? \(yes\/no\)/, 'confirmation - no works');
|
like ($output, qr/Permanently delete task 7 'foo'\? \(yes\/no\)/, 'confirmation - no works');
|
||||||
like ($output, qr/Task not deleted\./, 'confirmation - no works');
|
like ($output, qr/Task not deleted\./, 'confirmation - no works');
|
||||||
|
|
||||||
$output = qx{echo "n" | ../src/task rc:confirm.rc 7 del};
|
$output = qx{echo "n" | ../src/task rc:confirm.rc 7 del 2>&1};
|
||||||
like ($output, qr/Permanently delete task 7 'foo'\? \(yes\/no\)/, 'confirmation - n works');
|
like ($output, qr/Permanently delete task 7 'foo'\? \(yes\/no\)/, 'confirmation - n works');
|
||||||
like ($output, qr/Task not deleted\./, 'confirmation - n works');
|
like ($output, qr/Task not deleted\./, 'confirmation - n works');
|
||||||
|
|
||||||
$output = qx{echo "NO" | ../src/task rc:confirm.rc 7 del};
|
$output = qx{echo "NO" | ../src/task rc:confirm.rc 7 del 2>&1};
|
||||||
like ($output, qr/Permanently delete task 7 'foo'\? \(yes\/no\)/, 'confirmation - NO works');
|
like ($output, qr/Permanently delete task 7 'foo'\? \(yes\/no\)/, 'confirmation - NO works');
|
||||||
like ($output, qr/Task not deleted\./, 'confirmation - NO works'); # 20
|
like ($output, qr/Task not deleted\./, 'confirmation - NO works'); # 20
|
||||||
|
|
||||||
$output = qx{echo "N" | ../src/task rc:confirm.rc 7 del};
|
$output = qx{echo "N" | ../src/task rc:confirm.rc 7 del 2>&1};
|
||||||
like ($output, qr/Permanently delete task 7 'foo'\? \(yes\/no\)/, 'confirmation - N works');
|
like ($output, qr/Permanently delete task 7 'foo'\? \(yes\/no\)/, 'confirmation - N works');
|
||||||
like ($output, qr/Task not deleted\./, 'confirmation - N works');
|
like ($output, qr/Task not deleted\./, 'confirmation - N works');
|
||||||
|
|
||||||
# Test newlines.
|
# Test newlines.
|
||||||
$output = qx{cat response.txt | ../src/task rc:confirm.rc 7 del};
|
$output = qx{cat response.txt | ../src/task rc:confirm.rc 7 del 2>&1};
|
||||||
like ($output, qr/(Permanently delete task 7 'foo'\? \(yes\/no\)) \1 \1/, 'confirmation - \n re-prompt works'); # 43
|
like ($output, qr/(Permanently delete task 7 'foo'\? \(yes\/no\)) \1 \1/, 'confirmation - \n re-prompt works'); # 43
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
22
test/count.t
22
test/count.t
|
@ -40,31 +40,31 @@ if (open my $fh, '>', 'count.rc')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test the count command.
|
# Test the count command.
|
||||||
qx{../src/task rc:count.rc add one};
|
qx{../src/task rc:count.rc add one 2>&1};
|
||||||
qx{../src/task rc:count.rc log two};
|
qx{../src/task rc:count.rc log two 2>&1};
|
||||||
qx{../src/task rc:count.rc add three};
|
qx{../src/task rc:count.rc add three 2>&1};
|
||||||
qx{../src/task rc:count.rc 2 delete};
|
qx{../src/task rc:count.rc 2 delete 2>&1};
|
||||||
qx{../src/task rc:count.rc add four wait:eom};
|
qx{../src/task rc:count.rc add four wait:eom 2>&1};
|
||||||
|
|
||||||
# TODO This fails when today == eom. For example, on 2012-04-30 at 8:00:00, the
|
# TODO This fails when today == eom. For example, on 2012-04-30 at 8:00:00, the
|
||||||
# value for 'eom' is 2012-04-30 0:00:00, which is already past due, which
|
# value for 'eom' is 2012-04-30 0:00:00, which is already past due, which
|
||||||
# means a second child task is generated. This would be fixed by 'eom'
|
# means a second child task is generated. This would be fixed by 'eom'
|
||||||
# expanding to 2012-04-30 24:00:00, as per ISO-8601.
|
# expanding to 2012-04-30 24:00:00, as per ISO-8601.
|
||||||
qx{../src/task rc:count.rc add five due:eom recur:monthly};
|
qx{../src/task rc:count.rc add five due:eom recur:monthly 2>&1};
|
||||||
|
|
||||||
my $output = qx{../src/task rc:count.rc count};
|
my $output = qx{../src/task rc:count.rc count 2>&1};
|
||||||
like ($output, qr/^5\n/ms, 'count');
|
like ($output, qr/^5\n/ms, 'count');
|
||||||
|
|
||||||
$output = qx{../src/task rc:count.rc count status:deleted rc.debug:1};
|
$output = qx{../src/task rc:count.rc count status:deleted rc.debug:1 2>&1};
|
||||||
like ($output, qr/^1\n/ms, 'count status:deleted');
|
like ($output, qr/^1\n/ms, 'count status:deleted');
|
||||||
|
|
||||||
$output = qx{../src/task rc:count.rc count e};
|
$output = qx{../src/task rc:count.rc count e 2>&1};
|
||||||
like ($output, qr/^3\n/ms, 'count e');
|
like ($output, qr/^3\n/ms, 'count e');
|
||||||
|
|
||||||
$output = qx{../src/task rc:count.rc count description.startswith:f};
|
$output = qx{../src/task rc:count.rc count description.startswith:f 2>&1};
|
||||||
like ($output, qr/^2\n/ms, 'count description.startswith:f');
|
like ($output, qr/^2\n/ms, 'count description.startswith:f');
|
||||||
|
|
||||||
$output = qx{../src/task rc:count.rc count due.any:};
|
$output = qx{../src/task rc:count.rc count due.any: 2>&1};
|
||||||
like ($output, qr/^1\n/ms, 'count due.any:');
|
like ($output, qr/^1\n/ms, 'count due.any:');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue