mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-23 14:36:44 +02:00
tests: Add test for legacy context interpretation
This commit is contained in:
parent
d5a026d91a
commit
f6d9837b07
1 changed files with 10 additions and 0 deletions
|
@ -206,6 +206,16 @@ class ContextManagementTest(TestCase):
|
|||
self.assertEqual(len(list(filter(contains_work, out.splitlines()))), 1)
|
||||
self.assertEqual(len(list(filter(contains_home, out.splitlines()))), 1)
|
||||
|
||||
def test_context_list_legacy(self):
|
||||
"""Test the determination of legacy context definition."""
|
||||
self.t('config context.old project:Old', input='y\n')
|
||||
self.t('context old')
|
||||
code, out, err = self.t('context list')
|
||||
|
||||
# Assert that "old" context has only the read component defined
|
||||
self.assertRegex(out, r'read\s+project:Old\s+yes')
|
||||
self.assertRegex(out, r'write\s+yes')
|
||||
|
||||
def test_context_initially_empty(self):
|
||||
"""Test that no context is set initially."""
|
||||
self.t('context define work project:Work', input='y\ny\n')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue