summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-03-13 22:07:36 (GMT)
committerGeorg Brandl <georg@python.org>2007-03-13 22:07:36 (GMT)
commit03b90d8cfde0e74ec633f79201b53aada21bf42c (patch)
treef546d8e0e2a3f48a588ca1473df901562dc59da2 /Lib/test
parentb6ae6aa8ac8abb9350f2ae2186d609116676c661 (diff)
downloadcpython-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.py7
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)