summaryrefslogtreecommitdiff
path: root/test/test_files.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2011-08-22 07:42:17 -0400
committerNed Batchelder <ned@nedbatchelder.com>2011-08-22 07:42:17 -0400
commit103d412fe44d335804b3fa149da6ce7e686943e0 (patch)
tree4e6a4f0fa4feee377c0d022ad9f461528bdf3ec5 /test/test_files.py
parent6b00eb851344fd4c733b51d6402d36ea4158471d (diff)
downloadpython-coveragepy-git-103d412fe44d335804b3fa149da6ce7e686943e0.tar.gz
PathAliases munges the fnmatch pattern, and could have accidentally borked the match.
Diffstat (limited to 'test/test_files.py')
-rw-r--r--test/test_files.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_files.py b/test/test_files.py
index 2f26c7b5..565bbaa4 100644
--- a/test/test_files.py
+++ b/test/test_files.py
@@ -120,6 +120,13 @@ class PathAliasesTest(CoverageTest):
aliases.add, "/ned/home/*/*/", "fooey"
)
+ def test_no_accidental_munging(self):
+ aliases = PathAliases()
+ aliases.add(r'c:\Zoo\boo', 'src/')
+ aliases.add('/home/ned$', 'src/')
+ self.assertEqual(aliases.map(r'c:\Zoo\boo\foo.py'), 'src/foo.py')
+ self.assertEqual(aliases.map(r'/home/ned$/foo.py'), 'src/foo.py')
+
def test_paths_are_os_corrected(self):
aliases = PathAliases()
aliases.add('/home/ned/*/src', './mysrc')