mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
tests: Allow match for 8 bit color code in color.rules.t
The test proper coloring for overdue task from an hour ago fails, even though the task is properly colored. This is because the blue color gets upgraded to blue color in 256-color scheme, and hence is represented with 38;5;4m instead of 34m. Support both representations of the blue color in the given test.
This commit is contained in:
parent
982308412d
commit
7dfff13b06
1 changed files with 2 additions and 1 deletions
|
@ -126,7 +126,8 @@ class TestColorRules(TestCase):
|
|||
def test_due_anhourago(self):
|
||||
"""Overdue color rule from an hour ago."""
|
||||
code, out, err = self.t('/anhourago/ info')
|
||||
self.assertIn('\x1b[34m', out)
|
||||
# Match 4-bit or 8-bit blue color code
|
||||
self.assertRegex(out, '\x1b\[(38;5;4|34)m')
|
||||
|
||||
def test_due_tomorrow(self):
|
||||
"""Due tomorrow color rule."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue