Properly escape filters including spaces
This adds a note to the man page to properly escape filters containing spaces. It also fixes the unittests to reflect this. One of the unittests contained an alternative syntax as discussed in TW-1479 (#1505). It has been extracted into its own unittest and marked as an expected failure because it is currently not supported.
This commit is contained in:
committed by
Tomas Babej
parent
09e2cb46d6
commit
d85901e7ff
@@ -670,7 +670,7 @@ class TestBug1600(TestCase):
|
||||
self.assertIn("foobar1", out)
|
||||
self.assertIn("foobar2", out)
|
||||
|
||||
code, out, err = self.t("all description.contains:'foobar\\+'")
|
||||
code, out, err = self.t(r"all description.contains:\'foobar\\+\'")
|
||||
self.assertIn("foobar+", out)
|
||||
self.assertNotIn("foobar1", out)
|
||||
self.assertNotIn("foobar2", out)
|
||||
|
||||
@@ -464,7 +464,7 @@ class TestBug1617(TestCase):
|
||||
self.t("add one")
|
||||
self.t("add two project:'three four'")
|
||||
|
||||
code, out, err = self.t("project:'three four' list")
|
||||
code, out, err = self.t(r"project:\'three\ four\' list")
|
||||
self.assertIn("two", out)
|
||||
self.assertNotIn("one", out)
|
||||
|
||||
|
||||
@@ -254,11 +254,17 @@ class TestBug1479(TestCase):
|
||||
self.t("add project:P1 one")
|
||||
self.t("add project:P2 one two")
|
||||
|
||||
code, out, err = self.t("description:one\ two list")
|
||||
code, out, err = self.t(r"description:\'one\ two\' list")
|
||||
self.assertNotIn("P1", out)
|
||||
self.assertIn("P2", out)
|
||||
|
||||
code, out, err = self.t("description:'one two' list")
|
||||
@unittest.expectedFailure
|
||||
def test_description_with_spaces_alternative_syntax(self):
|
||||
"""1479: Alternative syntax"""
|
||||
self.t("add project:P1 one")
|
||||
self.t("add project:P2 one two")
|
||||
|
||||
code, out, err = self.t("description:one\ two list")
|
||||
self.assertNotIn("P1", out)
|
||||
self.assertIn("P2", out)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user