mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
tests: Adjust tests enforcing incorrect behaviour
In 1a001cae
, double json-decoding of the attribute values was removed,
and as such we need to adjust tests to actually enforce correct
behaviour.
This commit is contained in:
parent
1a001caedd
commit
9753e22d0c
2 changed files with 8 additions and 10 deletions
|
@ -74,7 +74,7 @@ class TestBug880(TestCase):
|
|||
|
||||
def test_backslash_at_eol(self):
|
||||
"""880: Backslash at end of description/annotation causes problems"""
|
||||
self.t("add one\\\\\\\\")
|
||||
self.t(r"add one\\")
|
||||
code, out, err = self.t("_get 1.description")
|
||||
self.assertEqual("one\\\n", out)
|
||||
|
||||
|
|
|
@ -85,15 +85,13 @@ class TestUnicode(TestCase):
|
|||
def test_unicode_escape2(self):
|
||||
"""Verify \\uNNNN unicode sequences"""
|
||||
|
||||
# The following can be used to prove that \\\\ --> \.
|
||||
# The Python string converts \\\\ --> \\.
|
||||
# Something in the launch code converts \\ --> \.
|
||||
# Taskwarrior sees \.
|
||||
#
|
||||
#code, out, err = self.t("add rc.debug.parser=2 Price \\\\u20A43")
|
||||
#self.tap(err)
|
||||
|
||||
self.t("add Price \\\\u20A43")
|
||||
# The quotes around 'Price \u20A43' are necessarry, because otherwise
|
||||
# bash eats the \ sign and task never sees it.
|
||||
# Verify by running:
|
||||
# $ echo add Price \u20A43 # \ is consumed
|
||||
# $ echo add "Price \u20A43" # \ is preserved
|
||||
# $ echo add 'Price \u20A43' # \ is preserved
|
||||
self.t(r"add 'Price \u20A43'")
|
||||
code, out, err = self.t("_get 1.description")
|
||||
self.assertEqual("Price ₤3\n", out);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue