mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 04:13:07 +02:00
Test: Added UDA format tests
This commit is contained in:
parent
d66d53a013
commit
9541a63321
1 changed files with 26 additions and 3 deletions
|
@ -384,15 +384,38 @@ class TestDateFormats(TestCase):
|
|||
code, out, err = self.t.runError("xxx rc.report.xxx.columns:id,due.donkey,description")
|
||||
self.assertEqual(err, "Unrecognized column format 'due.donkey'\n")
|
||||
|
||||
class TestUDAFormats(TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
"""Executed once before any test in the class"""
|
||||
cls.t = Task()
|
||||
cls.t.config("report.xxx.columns", "id,priority")
|
||||
cls.t.config("verbose", "nothing")
|
||||
cls.t.config("uda.priority.indicator", "P")
|
||||
|
||||
cls.t("add one priority:H")
|
||||
|
||||
def test_uda_format_formatted(self):
|
||||
"""Verify priority.default formatting"""
|
||||
code, out, err = self.t("xxx rc.report.xxx.columns:id,priority.default")
|
||||
self.assertRegexpMatches(out, r'1\s+H')
|
||||
|
||||
def test_uda_format_indicator(self):
|
||||
"""Verify priority.indicator formatting"""
|
||||
code, out, err = self.t("xxx rc.report.xxx.columns:id,priority.indicator")
|
||||
self.assertRegexpMatches(out, r'1\s+P')
|
||||
|
||||
def test_uda_format_unrecognized(self):
|
||||
"""Verify priority.donkey formatting fails"""
|
||||
code, out, err = self.t.runError("xxx rc.report.xxx.columns:id,priority.donkey")
|
||||
self.assertEqual(err, "Unrecognized column format 'priority.donkey'\n")
|
||||
|
||||
|
||||
"""
|
||||
depends list* 1 2 10
|
||||
count [3]
|
||||
indicator D
|
||||
|
||||
priority default*
|
||||
(uda) indicator
|
||||
|
||||
start active* ✓
|
||||
"""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue