Enhancement
- Output error, header, footnote and debug messages on standard error.
This commit is contained in:
committed by
Paul Beckingham
parent
b093d23f1f
commit
b45a305df2
@@ -43,7 +43,7 @@ if (open my $fh, '>', 'basic.rc')
|
||||
my $version = slurp ('../../configure.ac');
|
||||
|
||||
# Test the usage command.
|
||||
my $output = qx{../src/task rc:basic.rc};
|
||||
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');
|
||||
|
||||
# Test the version command.
|
||||
|
||||
@@ -45,25 +45,25 @@ qx{../src/task rc:bug.rc ls};
|
||||
|
||||
# Result: trying to add the project generates an error about removing
|
||||
# recurrence from a task.
|
||||
my $output = qx{echo 'y' | ../src/task rc:bug.rc 1 modify project:bar};
|
||||
my $output = qx{echo 'y' | ../src/task rc:bug.rc 1 modify project:bar 2>&1 >/dev/null};
|
||||
unlike ($output, qr/You cannot remove the recurrence from a recurring task./ms, 'No recurrence removal error');
|
||||
|
||||
# Now try to generate the error above via regular means - ie, is it actually
|
||||
# doing what it should?
|
||||
# TODO Removing recur: from a recurring task should also remove imask and parent.
|
||||
$output = qx{../src/task rc:bug.rc 2 modify recur:};
|
||||
$output = qx{../src/task rc:bug.rc 2 modify recur: 2>&1 >/dev/null};
|
||||
like ($output, qr/You cannot remove the recurrence from a recurring task./ms, 'Recurrence removal error');
|
||||
|
||||
# Prevent removal of the due date from a recurring task.
|
||||
# TODO Removing due: from a recurring task should also remove recur, imask and parent
|
||||
$output = qx{../src/task rc:bug.rc 2 modify due:};
|
||||
$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');
|
||||
|
||||
# Allow removal of the due date from a non-recurring task.
|
||||
qx{../src/task rc:bug.rc add nonrecurring};
|
||||
$output = qx{../src/task rc:bug.rc ls};
|
||||
my ($id) = $output =~ /(\d+)\s+nonrecurring/;
|
||||
$output = qx{../src/task rc:bug.rc $id modify due:};
|
||||
$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');
|
||||
|
||||
$output = qx{../src/task rc:bug.rc diag};
|
||||
|
||||
@@ -45,12 +45,12 @@ if (open my $fh, '>', 'bug.rc')
|
||||
qx{../src/task rc:bug.rc add One project:p1};
|
||||
|
||||
# Delete the task and note the completion status of the project.
|
||||
my $output = qx{echo 'y' | ../src/task rc:bug.rc 1 delete};
|
||||
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.');
|
||||
|
||||
# Add another task, complete it and note the completion status of hte project.
|
||||
qx{../src/task rc:bug.rc add Two project:p1};
|
||||
$output = qx{../src/task rc:bug.rc 2 done};
|
||||
$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.');
|
||||
|
||||
# Cleanup.
|
||||
|
||||
@@ -55,16 +55,16 @@ qx{../src/task rc:bug.rc add Nine pro:p1};
|
||||
qx{../src/task rc:bug.rc add Ten pro:p1};
|
||||
|
||||
# Complete three tasks and ensure pending and done counts are updated correctly.
|
||||
my $output = qx{../src/task rc:bug.rc 1-3 do};
|
||||
my $output = qx{../src/task rc:bug.rc 1-3 do 2>&1 >/dev/null};
|
||||
like ($output, qr/Project 'p1' is 30% complete \(7 of 10 tasks remaining\)\./ms, 'Project counts correct for a multiple done');
|
||||
|
||||
# Change three projects and ensure pending and done counts are updated correctly.
|
||||
$output = qx{../src/task rc:bug.rc 4-6 modify pro:p2};
|
||||
$output = qx{../src/task rc:bug.rc 4-6 modify pro:p2 2>&1 >/dev/null};
|
||||
like ($output, qr/Project 'p1' is 42% complete \(4 of 7 tasks remaining\)\./ms, 'Project counts correct for a multiple project reassignment part a');
|
||||
like ($output, qr/Project 'p2' is 0% complete \(3 of 3 tasks remaining\)\./ms, 'Project counts correct for a multiple project reassignment part b');
|
||||
|
||||
# Delete three tasks and ensure pending and done counts are updated correctly.
|
||||
$output = qx{../src/task rc:bug.rc 7-9 del};
|
||||
$output = qx{../src/task rc:bug.rc 7-9 del 2>&1 >/dev/null};
|
||||
like ($output, qr/Project 'p1' is 75% complete \(1 of 4 tasks remaining\)\./ms, 'Project counts correct for a multiple delete');
|
||||
|
||||
# Cleanup.
|
||||
|
||||
@@ -42,7 +42,7 @@ if (open my $fh, '>', 'bug.rc')
|
||||
my $output = qx{../src/task rc:bug.rc add one due:sund};
|
||||
like ($output, qr/Created task 1\./, 'sund --> valid date');
|
||||
|
||||
$output = qx{../src/task rc:bug.rc add two due:donkey};
|
||||
$output = qx{../src/task rc:bug.rc add two due:donkey 2>&1 >/dev/null};
|
||||
like ($output, qr/was not recognized\./, 'donkey --> invalid date');
|
||||
|
||||
# Cleanup.
|
||||
|
||||
@@ -40,16 +40,16 @@ if (open my $fh, '>', 'bug.rc')
|
||||
}
|
||||
|
||||
# Bug 899: task log does not behave correctly when logging into a project
|
||||
my $output = qx{../src/task rc:bug.rc add one pro:A};
|
||||
my $output = qx{../src/task rc:bug.rc add one pro:A 2>&1 >/dev/null};
|
||||
like ($output, qr/ 0% complete \(1 of 1 /, '1 of 1 tasks remaining - 0%');
|
||||
|
||||
$output = qx{../src/task rc:bug.rc add two pro:A};
|
||||
$output = qx{../src/task rc:bug.rc add two pro:A 2>&1 >/dev/null};
|
||||
like ($output, qr/ 0% complete \(2 of 2 /, '2 of 2 tasks remaining - 0%');
|
||||
|
||||
$output = qx{../src/task rc:bug.rc 1 done};
|
||||
$output = qx{../src/task rc:bug.rc 1 done 2>&1 >/dev/null};
|
||||
like ($output, qr/ 50% complete \(1 of 2 /, '1 of 2 tasks remaining - 50%');
|
||||
|
||||
$output = qx{../src/task rc:bug.rc log three pro:A};
|
||||
$output = qx{../src/task rc:bug.rc log three pro:A 2>&1 >/dev/null};
|
||||
like ($output, qr/ 66% complete \(1 of 3 /, '1 of 3 tasks remaining - 66%');
|
||||
|
||||
# Cleanup.
|
||||
|
||||
@@ -40,14 +40,14 @@ if (open my $fh, '>', 'bug.rc')
|
||||
|
||||
# Attempt a blank annotation.
|
||||
qx{../src/task rc:bug.rc add foo};
|
||||
my $output = qx{../src/task rc:bug.rc 1 annotate};
|
||||
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');
|
||||
|
||||
# Attempt an annotation without ID
|
||||
$output = qx{echo "n" | ../src/task rc:bug.rc annotate bar};
|
||||
$output = qx{echo "n" | ../src/task rc:bug.rc annotate bar 2>&1 >/dev/null};
|
||||
like ($output, qr/Command prevented from running/, 'Filter-less write command inhibited');
|
||||
|
||||
$output = qx{echo "y" | ../src/task rc:bug.rc annotate bar};
|
||||
$output = qx{echo "y" | ../src/task rc:bug.rc annotate bar 2>&1 >/dev/null};
|
||||
unlike ($output, qr/Command prevented from running/, 'Filter-less write command permitted');
|
||||
|
||||
# Cleanup.
|
||||
|
||||
@@ -53,11 +53,11 @@ $output = qx{echo 'y' | ../src/task rc:delete.rc undo; ../src/task rc:delete.rc
|
||||
like ($output, qr/Status\s+Pending\n/, 'Pending');
|
||||
ok (-r 'completed.data', 'completed.data created');
|
||||
|
||||
$output = qx{../src/task rc:delete.rc 1 delete; ../src/task rc:delete.rc list};
|
||||
$output = qx{../src/task rc:delete.rc 1 delete; ../src/task rc:delete.rc list 2>&1 >/dev/null};
|
||||
like ($output, qr/No matches./, 'No matches');
|
||||
ok (-r 'completed.data', 'completed.data created');
|
||||
|
||||
$output = qx{../src/task rc:delete.rc info 1};
|
||||
$output = qx{../src/task rc:delete.rc info 1 2>&1 >/dev/null};
|
||||
like ($output, qr/No matches\./, 'No matches'); # 10
|
||||
|
||||
# Add a task, delete it, and modify on the fly.
|
||||
|
||||
@@ -49,15 +49,15 @@ qx{../src/task rc:dep.rc add One};
|
||||
qx{../src/task rc:dep.rc add Two};
|
||||
|
||||
# [2]
|
||||
my $output = qx{../src/task rc:dep.rc 1 modify dep:-2};
|
||||
my $output = qx{../src/task rc:dep.rc 1 modify dep:-2 2>&1 >/dev/null};
|
||||
like ($output, qr/Could not delete a dependency on task 2 - not found\./, 'dependencies - remove nonexistent dependency');
|
||||
|
||||
# [3]
|
||||
$output = qx{../src/task rc:dep.rc 1 modify dep:99};
|
||||
$output = qx{../src/task rc:dep.rc 1 modify dep:99 2>&1 >/dev/null};
|
||||
like ($output, qr/Could not create a dependency on task 99 - not found\./, 'dependencies - add dependency for nonexistent task');
|
||||
|
||||
# [4]
|
||||
$output = qx{../src/task rc:dep.rc 99 modify dep:1};
|
||||
$output = qx{../src/task rc:dep.rc 99 modify dep:1 2>&1 >/dev/null};
|
||||
like ($output, qr/No tasks specified\./, 'dependencies - add dependency to nonexistent task');
|
||||
|
||||
# [5,6] t 1 dep:2; t info 1 => blocked by 2
|
||||
@@ -71,16 +71,16 @@ unlike ($output, qr/This task blocked by/, 'dependencies - trivial
|
||||
like ($output, qr/This task is blocking\s+1 One\nUUID/, 'dependencies - trivial blocking');
|
||||
|
||||
# [9] t 1 dep:2 (again)
|
||||
$output = qx{../src/task rc:dep.rc 1 modify dep:2};
|
||||
$output = qx{../src/task rc:dep.rc 1 modify dep:2 2>&1 >/dev/null};
|
||||
like ($output, qr/Task 1 already depends on task 2\./, 'dependencies - add already existing dependency');
|
||||
|
||||
# [10,11] t 1 dep:1 => error
|
||||
$output = qx{../src/task rc:dep.rc 1 modify dep:1};
|
||||
$output = qx{../src/task rc:dep.rc 1 modify dep:1 2>&1};
|
||||
like ($output, qr/A task cannot be dependent on itself\./, 'dependencies - cannot depend on self');
|
||||
unlike ($output, qr/Modified 1 task\./, 'dependencies - cannot depend on self');
|
||||
|
||||
# [12,13] t 1 dep:2; t 2 dep:1 => error
|
||||
$output = qx{../src/task rc:dep.rc 2 modify dep:1};
|
||||
$output = qx{../src/task rc:dep.rc 2 modify dep:1 2>&1};
|
||||
like ($output, qr/Circular dependency detected and disallowed\./, 'dependencies - trivial circular');
|
||||
unlike ($output, qr/Modified 1 task\./, 'dependencies - trivial circular');
|
||||
|
||||
@@ -105,7 +105,7 @@ qx{../src/task rc:dep.rc add Five};
|
||||
qx{../src/task rc:dep.rc 5 modify dep:4; ../src/task rc:dep.rc 4 modify dep:3; ../src/task rc:dep.rc 3 modify dep:2; ../src/task rc:dep.rc 2 modify dep:1};
|
||||
|
||||
# [17,18] 5 dep 4 dep 3 dep 2 dep 1 dep 5 => error
|
||||
$output = qx{../src/task rc:dep.rc 1 modify dep:5};
|
||||
$output = qx{../src/task rc:dep.rc 1 modify dep:5 2>&1 >/dev/null};
|
||||
like ($output, qr/Circular dependency detected and disallowed\./, 'dependencies - nontrivial circular');
|
||||
unlike ($output, qr/Modified 1 task\./, 'dependencies - nontrivial circular');
|
||||
|
||||
|
||||
@@ -42,10 +42,10 @@ if (open my $fh, '>', 'bug.rc')
|
||||
|
||||
# Feature 559: rc.exit.on.missing.db should cause exit if rc.data.location is missing.
|
||||
qx{../src/task rc:bug.rc add foo rc.debug:1};
|
||||
my $output = qx{../src/task rc:bug.rc list};
|
||||
unlike ($output, qr/Error.+does not exist/, 'No error on extant rc.data.location');
|
||||
my $output = qx{../src/task rc:bug.rc list 2>&1 >/dev/null};
|
||||
unlike ($output, qr/Error.+does not exist/, 'No error on existant rc.data.location');
|
||||
|
||||
$output = qx{../src/task rc:bug.rc rc.data.location=donkey list};
|
||||
$output = qx{../src/task rc:bug.rc rc.data.location=donkey list 2>&1 >/dev/null};
|
||||
like ($output, qr/Error.+does not exist/, 'Error on missing rc.data.location');
|
||||
|
||||
# Cleanup.
|
||||
|
||||
@@ -51,7 +51,7 @@ EOF
|
||||
ok (-r 'import.txt', 'Created sample import data');
|
||||
}
|
||||
|
||||
my $output = qx{../src/task rc:import.rc import import.txt};
|
||||
my $output = qx{../src/task rc:import.rc import import.txt 2>&1 >/dev/null};
|
||||
like ($output, qr/Imported 3 tasks\./, 'no errors');
|
||||
# Imported 3 tasks successfully.
|
||||
|
||||
@@ -79,7 +79,7 @@ unlike ($output, qr/2.+B.+one/, 't2 missing');
|
||||
like ($output, qr/2\/13\/2009.+two/, 't3 present');
|
||||
|
||||
# Make sure that a duplicate task cannot be imported.
|
||||
$output = qx{../src/task rc:import.rc import import.txt};
|
||||
$output = qx{../src/task rc:import.rc import import.txt 2>&1 >/dev/null};
|
||||
like ($output, qr/Cannot add task because the uuid .+ is not unique\./, 'error on duplicate uuid');
|
||||
|
||||
# Create import file.
|
||||
@@ -93,7 +93,7 @@ EOF
|
||||
ok (-r 'import2.txt', 'Created second sample import data');
|
||||
}
|
||||
|
||||
$output = qx{../src/task rc:import.rc import import2.txt};
|
||||
$output = qx{../src/task rc:import.rc import import2.txt 2>&1 >/dev/null};
|
||||
like ($output, qr/Imported 1 tasks\./, 'no errors');
|
||||
# Imported 1 tasks successfully.
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ EOF
|
||||
qx{../scripts/add-ons/import-yaml.pl <import.txt >import.json};
|
||||
|
||||
# Import the JSON.
|
||||
my $output = qx{../src/task rc:import.rc import import.json};
|
||||
my $output = qx{../src/task rc:import.rc import import.json 2>&1 >/dev/null};
|
||||
like ($output, qr/Imported 3 tasks\./, '3 tasks imported');
|
||||
|
||||
$output = qx{../src/task rc:import.rc list};
|
||||
@@ -100,7 +100,7 @@ unlike ($output, qr/2.+B.+one/, 't2 missing');
|
||||
like ($output, qr/9\/4\/2011.+two/, 't3 present');
|
||||
|
||||
# Make sure that a duplicate task cannot be imported.
|
||||
$output = qx{../src/task rc:import.rc import import.json};
|
||||
$output = qx{../src/task rc:import.rc import import.json 2>&1 >/dev/null};
|
||||
like ($output, qr/Cannot add task because the uuid '.{36}' is not unique\./, 'error on duplicate uuid');
|
||||
|
||||
# Create import file.
|
||||
@@ -125,7 +125,7 @@ EOF
|
||||
qx{../scripts/add-ons/import-yaml.pl <import.txt >import.json};
|
||||
|
||||
# Import the JSON.
|
||||
$output = qx{../src/task rc:import.rc import import.json};
|
||||
$output = qx{../src/task rc:import.rc import import.json 2>&1 >/dev/null};
|
||||
like ($output, qr/Imported 1 tasks\./, '1 task imported');
|
||||
|
||||
# Verify.
|
||||
|
||||
12
test/nag.t
12
test/nag.t
@@ -47,12 +47,12 @@ my $setup = "../src/task rc:nag.rc add due:yesterday one;"
|
||||
. "../src/task rc:nag.rc add six;";
|
||||
qx{$setup};
|
||||
|
||||
like (qx{../src/task rc:nag.rc 6 do}, qr/NAG/, 'do pri: -> nag');
|
||||
like (qx{../src/task rc:nag.rc 5 do}, qr/NAG/, 'do pri:L -> nag');
|
||||
like (qx{../src/task rc:nag.rc 4 do}, qr/NAG/, 'do pri:M-> nag');
|
||||
like (qx{../src/task rc:nag.rc 3 do}, qr/NAG/, 'do pri:H-> nag');
|
||||
like (qx{../src/task rc:nag.rc 2 do}, qr/NAG/, 'do due:tomorrow -> nag');
|
||||
my $output = qx{../src/task rc:nag.rc 1 do};
|
||||
like (qx{../src/task rc:nag.rc 6 do 2>&1 >/dev/null}, qr/NAG/, 'do pri: -> nag');
|
||||
like (qx{../src/task rc:nag.rc 5 do 2>&1 >/dev/null}, qr/NAG/, 'do pri:L -> nag');
|
||||
like (qx{../src/task rc:nag.rc 4 do 2>&1 >/dev/null}, qr/NAG/, 'do pri:M-> nag');
|
||||
like (qx{../src/task rc:nag.rc 3 do 2>&1 >/dev/null}, qr/NAG/, 'do pri:H-> nag');
|
||||
like (qx{../src/task rc:nag.rc 2 do 2>&1 >/dev/null}, qr/NAG/, 'do due:tomorrow -> nag');
|
||||
my $output = qx{../src/task rc:nag.rc 1 do 2>&1 >/dev/null};
|
||||
unlike ($output, qr/NAG/, 'do due:yesterday -> no nag');
|
||||
|
||||
# Cleanup.
|
||||
|
||||
@@ -40,30 +40,30 @@ if (open my $fh, '>', 'pro.rc')
|
||||
}
|
||||
|
||||
# Test the project status numbers.
|
||||
my $output = qx{../src/task rc:pro.rc add one pro:foo};
|
||||
my $output = qx{../src/task rc:pro.rc add one pro:foo 2>&1 >/dev/null};
|
||||
like ($output, qr/The project 'foo' has changed\. Project 'foo' is 0% complete \(1 of 1 tasks remaining\)\./, 'add one');
|
||||
|
||||
$output = qx{../src/task rc:pro.rc add two pro:'foo'};
|
||||
$output = qx{../src/task rc:pro.rc add two pro:'foo' 2>&1 >/dev/null};
|
||||
like ($output, qr/The project 'foo' has changed\. Project 'foo' is 0% complete \(2 of 2 tasks remaining\)\./, 'add two');
|
||||
|
||||
$output = qx{../src/task rc:pro.rc add three pro:'foo'};
|
||||
$output = qx{../src/task rc:pro.rc add three pro:'foo' 2>&1 >/dev/null};
|
||||
like ($output, qr/The project 'foo' has changed\. Project 'foo' is 0% complete \(3 of 3 tasks remaining\)\./, 'add three');
|
||||
|
||||
$output = qx{../src/task rc:pro.rc add four pro:'foo'};
|
||||
$output = qx{../src/task rc:pro.rc add four pro:'foo' 2>&1 >/dev/null};
|
||||
like ($output, qr/The project 'foo' has changed\. Project 'foo' is 0% complete \(4 of 4 tasks remaining\)\./, 'add four');
|
||||
|
||||
$output = qx{../src/task rc:pro.rc 1 done};
|
||||
$output = qx{../src/task rc:pro.rc 1 done 2>&1 >/dev/null};
|
||||
like ($output, qr/Project 'foo' is 25% complete \(3 of 4 tasks remaining\)\./, 'done one');
|
||||
|
||||
$output = qx{../src/task rc:pro.rc 2 delete};
|
||||
$output = qx{../src/task rc:pro.rc 2 delete 2>&1 >/dev/null};
|
||||
like ($output, qr/The project 'foo' has changed\. Project 'foo' is 33% complete \(2 of 3 tasks remaining\)\./, 'delete two');
|
||||
|
||||
$output = qx{../src/task rc:pro.rc 3 modify pro:bar};
|
||||
$output = qx{../src/task rc:pro.rc 3 modify pro:bar 2>&1 >/dev/null};
|
||||
like ($output, qr/The project 'foo' has changed\. Project 'foo' is 50% complete \(1 of 2 tasks remaining\)\./, 'change project');
|
||||
like ($output, qr/The project 'bar' has changed\. Project 'bar' is 0% complete \(1 of 1 tasks remaining\)\./, 'change project');
|
||||
|
||||
# Test projects with spaces in them.
|
||||
$output = qx{../src/task rc:pro.rc 3 modify pro:\\"foo bar\\"};
|
||||
$output = qx{../src/task rc:pro.rc 3 modify pro:\\"foo bar\\" 2>&1 >/dev/null};
|
||||
like ($output, qr/The project 'foo bar' has changed\./, 'project with spaces');
|
||||
|
||||
# Cleanup.
|
||||
|
||||
@@ -52,7 +52,7 @@ qx{../src/task rc:recur.rc 2 do};
|
||||
qx{../src/task rc:recur.rc 3 do};
|
||||
qx{../src/task rc:recur.rc 4 do};
|
||||
qx{../src/task rc:recur.rc 5 do};
|
||||
$output = qx{../src/task rc:recur.rc list};
|
||||
$output = qx{../src/task rc:recur.rc list 2>&1 >/dev/null};
|
||||
like ($output, qr/and was deleted/, 'Parent task deleted');
|
||||
|
||||
$output = qx{../src/task rc:recur.rc diag};
|
||||
|
||||
@@ -42,16 +42,16 @@ if (open my $fh, '>', 'shadow.rc')
|
||||
ok (-r 'shadow.rc', 'Created shadow.rc');
|
||||
}
|
||||
|
||||
my $output = qx{../src/task rc:shadow.rc add one};
|
||||
my $output = qx{../src/task rc:shadow.rc add one 2>&1 >/dev/null};
|
||||
like ($output, qr/\[Shadow file '\.\/shadow\.txt' updated\.\]/, 'shadow file updated on add');
|
||||
|
||||
$output = qx{../src/task rc:shadow.rc list};
|
||||
$output = qx{../src/task rc:shadow.rc list 2>&1 >/dev/null};
|
||||
unlike ($output, qr/\[Shadow file '\.\/shadow\.txt' updated\.\]/, 'shadow file not updated on list');
|
||||
|
||||
$output = qx{../src/task rc:shadow.rc 1 delete};
|
||||
$output = qx{../src/task rc:shadow.rc 1 delete 2>&1 >/dev/null};
|
||||
like ($output, qr/\[Shadow file '\.\/shadow\.txt' updated\.\]/, 'shadow file updated on delete');
|
||||
|
||||
$output = qx{../src/task rc:shadow.rc list};
|
||||
$output = qx{../src/task rc:shadow.rc list 2>&1 >/dev/null};
|
||||
unlike ($output, qr/\[Shadow file '\.\/shadow\.txt' updated\.\]/, 'shadow file not updated on list');
|
||||
|
||||
# Inspect the shadow file.
|
||||
|
||||
@@ -59,7 +59,7 @@ like ($output, qr/\bab\s*$/m, 'abc,ab,a,b | a -> ab');
|
||||
$output = qx{../src/task rc:sp.rc list project:abc};
|
||||
like ($output, qr/\babc\s*$/m, 'abc,ab,a,b | a -> abc');
|
||||
|
||||
$output = qx{../src/task rc:sp.rc list project:abcd};
|
||||
$output = qx{../src/task rc:sp.rc list project:abcd 2>&1 >/dev/null};
|
||||
like ($output, qr/No matches./, 'abc,ab,a,b | abcd -> nul');
|
||||
|
||||
# Cleanup.
|
||||
|
||||
@@ -53,7 +53,7 @@ $output = qx{../src/task rc:undo.rc undo; ../src/task rc:undo.rc info 1};
|
||||
ok (-r 'completed.data', 'completed.data created');
|
||||
like ($output, qr/Status\s+Pending\n/, 'Pending');
|
||||
|
||||
$output = qx{../src/task rc:undo.rc 1 do; ../src/task rc:undo.rc list};
|
||||
$output = qx{../src/task rc:undo.rc 1 do; ../src/task rc:undo.rc list 2>&1 >/dev/null};
|
||||
like ($output, qr/No matches/, 'No matches');
|
||||
|
||||
# Cleanup.
|
||||
|
||||
@@ -74,7 +74,7 @@ unlike ($output, qr/tomorrow/ms, 'waiting task invisible');
|
||||
$output = qx{../src/task rc:wait.rc all status:waiting wait:tomorrow};
|
||||
like ($output, qr/tomorrow/ms, 'waiting task visible when specifically queried');
|
||||
|
||||
$output = qx{../src/task rc:wait.rc add Complain due:today wait:tomorrow};
|
||||
$output = qx{../src/task rc:wait.rc add Complain due:today wait:tomorrow 2>&1 >/dev/null};
|
||||
like ($output, qr/Warning: You have specified that the 'wait' date is after the 'due' date\./, 'warning on wait after due');
|
||||
|
||||
# Cleanup.
|
||||
|
||||
Reference in New Issue
Block a user