Unit Tests

- Corrected all unit tests that used the old syntax "task done 1" to
  use the new syntax "task 1 done".  Similarly, "task 1 ..." is now
  "task 1 modify ...".
This commit is contained in:
Paul Beckingham
2011-07-31 19:03:19 -04:00
parent 9ce7f63d85
commit ac7bcc81ee
48 changed files with 177 additions and 177 deletions

View File

@@ -45,23 +45,23 @@ 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{../src/task rc:bug.rc 1 project:bar};
my $output = qx{../src/task rc:bug.rc 1 modify project:bar};
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?
$output = qx{../src/task rc:bug.rc 1 recur:};
$output = qx{../src/task rc:bug.rc 1 modify recur:};
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.
$output = qx{../src/task rc:bug.rc 1 due:};
$output = qx{../src/task rc:bug.rc 1 modify due:};
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 due:};
$output = qx{../src/task rc:bug.rc $id modify due:};
unlike ($output, qr/You cannot remove the due date from a recurring task./ms, 'Can remove due date from a non-recurring task');
# Cleanup.