diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2011-08-22 07:42:17 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2011-08-22 07:42:17 -0400 |
commit | 103d412fe44d335804b3fa149da6ce7e686943e0 (patch) | |
tree | 4e6a4f0fa4feee377c0d022ad9f461528bdf3ec5 /test/test_files.py | |
parent | 6b00eb851344fd4c733b51d6402d36ea4158471d (diff) | |
download | python-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.py | 7 |
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') |