TW-1641: 'edit' should process or reject <mods> arguments

- Thanks to Daniel Shahaf.
This commit is contained in:
Paul Beckingham 2015-07-25 09:39:13 -04:00
parent 7aa101de58
commit 99e0953489
12 changed files with 19 additions and 0 deletions

View file

@ -81,6 +81,8 @@
- TW-1638 Undo doesn't work when a context is set (thanks to Jeremy John Reeder).
- TW-1640 '_get <id>.start' for an inactive tasks returns a date formatted from
epoch 0.
- TW-1641 'edit' should process or reject <mods> arguments (thanks to Daniel
Shahaf).
- Prevent potential task duplication during import for non-pending tasks.
- Show the active context in "context list", if any is active.
- Fix "task edit" dropping annotation text after newlines.

View file

@ -67,6 +67,9 @@ int CmdEdit::execute (std::string& output)
std::vector <Task> filtered;
filter.subset (filtered);
if (filter.hasModifications ())
throw std::string (STRING_ERROR_NO_MODS);
// Find number of matching tasks.
for (auto& task : filtered)
{

View file

@ -747,6 +747,7 @@
#define STRING_INVALID_SORT_COL "Nach Spalte '{1}' kann nicht sortiert weden."
#define STRING_TLS_INIT_FAIL "Fehler bei der TLS-Initialisierung. {1}"
#define STRING_ERROR_DETAILS "Die Option 'calendar.details.report' muss einen einzelnen Report-Namen enthalten."
#define STRING_ERROR_NO_MODS "Command line modifications are not support by this command."
// Feedback
#define STRING_FEEDBACK_NO_TASKS "Keine Aufgaben."

View file

@ -747,6 +747,7 @@
#define STRING_INVALID_SORT_COL "The '{1}' column is not a valid sort field."
#define STRING_TLS_INIT_FAIL "Error initializing TLS. {1}"
#define STRING_ERROR_DETAILS "The setting 'calendar.details.report' must contain a single report name."
#define STRING_ERROR_NO_MODS "Command line modifications are not support by this command."
// Feedback
#define STRING_FEEDBACK_NO_TASKS "No tasks."

View file

@ -747,6 +747,7 @@
#define STRING_INVALID_SORT_COL "Kolumno '{1}' ne estas valida kampo por ordigi."
#define STRING_TLS_INIT_FAIL "Erara eko de TLS. {1}"
#define STRING_ERROR_DETAILS "Agordo 'calendar.details.report' devas enhavi sole unu raportnomon."
#define STRING_ERROR_NO_MODS "Command line modifications are not support by this command."
// Feedback
#define STRING_FEEDBACK_NO_TASKS "Nenia tasko."

View file

@ -759,6 +759,7 @@
#define STRING_INVALID_SORT_COL "La columna '{1}' no es un campo de ordenación válido."
#define STRING_TLS_INIT_FAIL "Error inicializando TLS. {1}"
#define STRING_ERROR_DETAILS "El ajuste 'calendar.details.report' debe contener un único nombre de informe."
#define STRING_ERROR_NO_MODS "Command line modifications are not support by this command."
// Feedback
#define STRING_FEEDBACK_NO_TASKS "Ninguna tarea."

View file

@ -747,6 +747,7 @@
#define STRING_INVALID_SORT_COL "The '{1}' column is not a valid sort field."
#define STRING_TLS_INIT_FAIL "Erreur en initialisant TLS. {1}"
#define STRING_ERROR_DETAILS "The setting 'calendar.details.report' must contain a single report name."
#define STRING_ERROR_NO_MODS "Command line modifications are not support by this command."
// Feedback
#define STRING_FEEDBACK_NO_TASKS "No tasks."

View file

@ -746,6 +746,7 @@
#define STRING_INVALID_SORT_COL "La colonna '{1}' non è un campo di ordinamento valido."
#define STRING_TLS_INIT_FAIL "Error initializing TLS. {1}"
#define STRING_ERROR_DETAILS "The setting 'calendar.details.report' must contain a single report name."
#define STRING_ERROR_NO_MODS "Command line modifications are not support by this command."
// Feedback
#define STRING_FEEDBACK_NO_TASKS "Nessun task."

View file

@ -747,6 +747,7 @@
#define STRING_INVALID_SORT_COL "The '{1}' column is not a valid sort field."
#define STRING_TLS_INIT_FAIL "TLS初期化でエラー。 {1}"
#define STRING_ERROR_DETAILS "The setting 'calendar.details.report' must contain a single report name."
#define STRING_ERROR_NO_MODS "Command line modifications are not support by this command."
// Feedback
#define STRING_FEEDBACK_NO_TASKS "タスクがない。"

View file

@ -747,6 +747,7 @@
#define STRING_INVALID_SORT_COL "Kolumna '{1}' nie jest poprawnym parametrem sortowania."
#define STRING_TLS_INIT_FAIL "Błąd inicjalizacji TLS."
#define STRING_ERROR_DETAILS "Zmienna 'calendar.details.report' musi zawierać nazwę raportu."
#define STRING_ERROR_NO_MODS "Command line modifications are not support by this command."
// Feedback
#define STRING_FEEDBACK_NO_TASKS "Brak zadań."

View file

@ -747,6 +747,7 @@
#define STRING_INVALID_SORT_COL "A coluna '{1}' não pode ser ordenada."
#define STRING_TLS_INIT_FAIL "Erro a iniciar componente TLS. {1}"
#define STRING_ERROR_DETAILS "A definição 'calendar.details.report' pode apenas indicar um nome de relatório."
#define STRING_ERROR_NO_MODS "Command line modifications are not support by this command."
// Feedback
#define STRING_FEEDBACK_NO_TASKS "Nenhuma tarefa."

View file

@ -83,6 +83,11 @@ class TestTaskEdit(TestCase):
# Does not fail
self.t("1 edit")
def test_command_line_modifications(self):
"""Verify that the 'edit' command does not accept command line modifications"""
code, out, err = self.t.runError("1 edit +foo")
self.assertIn("Command line modifications are not support by this command.", err)
if __name__ == "__main__":
from simpletap import TAPTestRunner