diff options
author | Georg Brandl <georg@python.org> | 2007-03-13 22:07:36 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-03-13 22:07:36 (GMT) |
commit | 03b90d8cfde0e74ec633f79201b53aada21bf42c (patch) | |
tree | f546d8e0e2a3f48a588ca1473df901562dc59da2 /Lib/test | |
parent | b6ae6aa8ac8abb9350f2ae2186d609116676c661 (diff) | |
download | cpython-03b90d8cfde0e74ec633f79201b53aada21bf42c.zip cpython-03b90d8cfde0e74ec633f79201b53aada21bf42c.tar.gz cpython-03b90d8cfde0e74ec633f79201b53aada21bf42c.tar.bz2 |
Patch #957650: "%var%" environment variable references are now properly
expanded in ntpath.expandvars(), also "~user" home directory references
are recognized and handled on Windows.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_ntpath.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py index da80bc6..703e5c8 100644 --- a/Lib/test/test_ntpath.py +++ b/Lib/test/test_ntpath.py @@ -134,6 +134,13 @@ try: tester('ntpath.expandvars("${{foo}}")', "baz1}") tester('ntpath.expandvars("$foo$foo")', "barbar") tester('ntpath.expandvars("$bar$bar")', "$bar$bar") + tester('ntpath.expandvars("%foo% bar")', "bar bar") + tester('ntpath.expandvars("%foo%bar")', "barbar") + tester('ntpath.expandvars("%foo%%foo%")', "barbar") + tester('ntpath.expandvars("%%foo%%foo%foo%")', "%foo%foobar") + tester('ntpath.expandvars("%?bar%")', "%?bar%") + tester('ntpath.expandvars("%foo%%bar")', "bar%bar") + tester('ntpath.expandvars("\'%foo%\'%bar")', "\'%foo%\'%bar") finally: os.environ.clear() os.environ.update(oldenv) |