diff options
author | Sjoerd Mullender <sjoerd@acm.org> | 2007-01-16 16:42:38 (GMT) |
---|---|---|
committer | Sjoerd Mullender <sjoerd@acm.org> | 2007-01-16 16:42:38 (GMT) |
commit | 33a0a06d318a3d7164f6269c209b2309781af767 (patch) | |
tree | 88f61b958cde2b25523598a1ee9486ce6fd66074 /Lib/test/test_posixpath.py | |
parent | fa3d08b4a92d8af3ec458137393b151a1a0b4391 (diff) | |
download | cpython-33a0a06d318a3d7164f6269c209b2309781af767.zip cpython-33a0a06d318a3d7164f6269c209b2309781af767.tar.gz cpython-33a0a06d318a3d7164f6269c209b2309781af767.tar.bz2 |
Fixed ntpath.expandvars to not replace references to non-existing
variables with nothing. Also added tests.
This fixes bug #494589.
Diffstat (limited to 'Lib/test/test_posixpath.py')
-rw-r--r-- | Lib/test/test_posixpath.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_posixpath.py b/Lib/test/test_posixpath.py index 3984157..20a1fc5 100644 --- a/Lib/test/test_posixpath.py +++ b/Lib/test/test_posixpath.py @@ -374,6 +374,8 @@ class PosixPathTest(unittest.TestCase): self.assertEqual(posixpath.expandvars("$foo}bar"), "bar}bar") self.assertEqual(posixpath.expandvars("${foo"), "${foo") self.assertEqual(posixpath.expandvars("${{foo}}"), "baz1}") + self.assertEqual(posixpath.expandvars("$foo$foo"), "barbar") + self.assertEqual(posixpath.expandvars("$bar$bar"), "$bar$bar") finally: os.environ.clear() os.environ.update(oldenv) |