mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
TW-1719: Description cannot contain improper ordinals
- Thanks to Ben Boeckel.
This commit is contained in:
parent
156357285c
commit
e361c2c751
3 changed files with 17 additions and 4 deletions
|
@ -25,6 +25,7 @@
|
|||
- TW-1705 Directories in .task/hooks should not be reported as invalid hooks
|
||||
(thanks to Tomas Babej).
|
||||
- TW-1714 Starting recurring task starts all recurrences (thanks to Robin Green).
|
||||
- TW-1719 Description cannot contain improper ordinals (thanks to Ben Boeckel).
|
||||
- TW-1720 CmdContext uses a mix of both throw and std::cout to convey
|
||||
errors (thanks to Paul Beckingham).
|
||||
- TW-1723 task info causes segfault (thanks to Roman Golovin).
|
||||
|
|
|
@ -440,11 +440,7 @@ bool namedDates (const std::string& name, Variant& value)
|
|||
value = Variant (mktime (t), Variant::type_date);
|
||||
}
|
||||
}
|
||||
else
|
||||
throw std::string (STRING_DATES_ORD_MISMATCH);
|
||||
}
|
||||
else
|
||||
throw std::string (STRING_DATES_MONTH_31);
|
||||
}
|
||||
|
||||
else if (closeEnough ("easter", name, minimum) ||
|
||||
|
|
16
test/add.t
16
test/add.t
|
@ -227,6 +227,22 @@ class TestBug1612(TestCase):
|
|||
self.assertEqual("(bar) a / (foo bar)\n", out)
|
||||
|
||||
|
||||
class TestBug1719(TestCase):
|
||||
def setUp(self):
|
||||
self.t = Task()
|
||||
|
||||
def test_improper_ordinals(self):
|
||||
"""1719: Description cannot contain improper ordinals"""
|
||||
self.t("add one 1th");
|
||||
self.t("add two 23rd");
|
||||
|
||||
code, out, err = self.t("_get 1.description")
|
||||
self.assertEqual("one 1th\n", out)
|
||||
|
||||
code, out, err = self.t("_get 2.description")
|
||||
self.assertEqual("two 23rd\n", out)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
from simpletap import TAPTestRunner
|
||||
unittest.main(testRunner=TAPTestRunner())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue