Unit Tests

- Escapes / characes in search patterns, so that 'foo/' --> 'foo\/', which
  then allows '/foo\//'. In Python, this needs one more: '/foo\\//'.
This commit is contained in:
Paul Beckingham 2014-11-09 17:11:21 -05:00
parent 3279566244
commit 879b1edb5c

View file

@ -21,8 +21,7 @@ class Test1418(TestCase):
self.assertIn(description, out)
def search_task_pattern(self, description):
# TODO escape any "/" in description - check comments on bug 1418
command = ("/" + description + "/",)
command = ("/" + description.replace("/", "\\/") + "/",)
code, out, err = self.t(command)
self.assertIn(description, out)