- Remove the test that prevents 'until' attributes to be modified for
  non-recurring tasks (thanks to Stéphane Pezennec).
- Unit test.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
This commit is contained in:
Louis-Claude Canon 2012-07-24 16:55:59 -04:00 committed by Paul Beckingham
parent 99849e55b4
commit c71146611c
5 changed files with 66 additions and 6 deletions

View file

@ -83,11 +83,6 @@ int CmdModify::execute (std::string& output)
!before.has ("due"))
throw std::string (STRING_CMD_MODIFY_NO_DUE);
if (task->has ("until") &&
!task->has ("recur") &&
!before.has ("recur"))
throw std::string (STRING_CMD_MODIFY_UNTIL);
if (before.has ("recur") &&
before.has ("due") &&
(!task->has ("due") ||

View file

@ -448,7 +448,6 @@
#define STRING_CMD_MODIFY_USAGE1 "Modifies the existing task with provided arguments."
#define STRING_CMD_MODIFY_NO_DUE "You cannot specify a recurring task without a due date."
#define STRING_CMD_MODIFY_UNTIL "You cannot specify an until date for a non-recurring task."
#define STRING_CMD_MODIFY_REM_DUE "You cannot remove the due date from a recurring task."
#define STRING_CMD_MODIFY_REC_ALWAYS "You cannot remove the recurrence from a recurring task."
#define STRING_CMD_MODIFY_TASK "Modifying task {1} '{2}'."