summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGhislain Rodrigues <git@ghislain-rodrigues.fr>2017-09-14 15:46:48 +0100
committerGhislain Rodrigues <git@ghislain-rodrigues.fr>2017-09-14 16:13:12 +0100
commiteaf6a633425d4303b123d40e2bafe07cba6deb0e (patch)
tree73d5a1ef2506ee114d20f2c0c1ecaa3f2d6c4777 /tests
parent314a9f55dd3222174e3d2b1db871480a870029de (diff)
downloadvdebug-eaf6a633425d4303b123d40e2bafe07cba6deb0e.zip
new tests added
Diffstat (limited to 'tests')
-rw-r--r--tests/test_util_filepath.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/test_util_filepath.py b/tests/test_util_filepath.py
index a7d7735..9f26877 100644
--- a/tests/test_util_filepath.py
+++ b/tests/test_util_filepath.py
@@ -186,4 +186,26 @@ class RemoteUnixLocalWinPathTest(unittest.TestCase):
filename = "file:///G:/local2/path/to/file"
file = FilePath(filename)
+ self.assertEqual("file:///remote2/path//to/file",file.as_remote())
+
+class MismatchingSeparatorsTest(unittest.TestCase):
+ def setUp(self):
+ vdebug.opts.Options.set({'path_maps':{'remote1/':'local1', 'remote2':'local2/'}})
+
+ def test_as_local(self):
+ filename = "/remote1/path/to/file"
+ file = FilePath(filename)
+ self.assertEqual("/local1/path/to/file",file.as_local())
+
+ filename = "/remote2/path/to/file"
+ file = FilePath(filename)
+ self.assertEqual("/local2//path/to/file",file.as_local())
+
+ def test_as_remote(self):
+ filename = "/local1/path/to/file"
+ file = FilePath(filename)
+ self.assertEqual("file:///remote1//path/to/file",file.as_remote())
+
+ filename = "/local2/path/to/file"
+ file = FilePath(filename)
self.assertEqual("file:///remote2/path/to/file",file.as_remote())