Commit b39d17b1 authored by Iustin Pop's avatar Iustin Pop
Browse files

Add UnescapeAndSplit unittest for multi-escapes

This would have caught the bug in the first place. Argh,
hand-generated test cases!
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarGuido Trotter <>
parent 997f690f
......@@ -335,6 +335,12 @@ class TestUnescapeAndSplit(unittest.TestCase):
b = [sep, sep, "c", "d.moo\\"]
self.assertEqual(utils.UnescapeAndSplit("%s\\" % sep.join(a), sep=sep), b)
def testMultipleEscapes(self):
for sep in self._seps:
a = ["a", "b\\" + sep + "c", "d\\" + sep + "e\\" + sep + "f", "g"]
b = ["a", "b" + sep + "c", "d" + sep + "e" + sep + "f", "g"]
self.failUnlessEqual(utils.UnescapeAndSplit(sep.join(a), sep=sep), b)
class TestCommaJoin(unittest.TestCase):
def test(self):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment