From 2ebfeacabc7b74d03fa7cb096d8b9d1ecbdbb6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergey=20M=E2=80=A4?= Date: Tue, 10 Mar 2015 00:50:11 +0600 Subject: [utils] Keep dot and dotdot unmodified (Closes #5171) --- test/test_utils.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') diff --git a/test/test_utils.py b/test/test_utils.py index 28bda654e..8f790bf0a 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -163,6 +163,11 @@ class TestUtil(unittest.TestCase): self.assertEqual(sanitize_path('abc.../def'), 'abc..#\\def') self.assertEqual(sanitize_path('abc.../def...'), 'abc..#\\def..#') + self.assertEqual(sanitize_path('../abc'), '..\\abc') + self.assertEqual(sanitize_path('../../abc'), '..\\..\\abc') + self.assertEqual(sanitize_path('./abc'), 'abc') + self.assertEqual(sanitize_path('./../abc'), '..\\abc') + def test_ordered_set(self): self.assertEqual(orderedSet([1, 1, 2, 3, 4, 4, 5, 6, 7, 3, 5]), [1, 2, 3, 4, 5, 6, 7]) self.assertEqual(orderedSet([]), []) -- cgit v1.2.3