diff options
author | Fred Drake <fdrake@acm.org> | 2002-09-27 16:21:18 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2002-09-27 16:21:18 (GMT) |
commit | 176916a98928c1828acd997f5bc11863f0d36c71 (patch) | |
tree | ea7ae810fcc5a8e05aa1f3cca2a2ce14852a7fe4 /Lib/test/test_cfgparser.py | |
parent | 2ca041fde0e20077b1a2bdb33a54db4c3badf38a (diff) | |
download | cpython-176916a98928c1828acd997f5bc11863f0d36c71.zip cpython-176916a98928c1828acd997f5bc11863f0d36c71.tar.gz cpython-176916a98928c1828acd997f5bc11863f0d36c71.tar.bz2 |
Allow internal whitespace in keys.
Closes SF bug #583248; backporting to r22-maint branch.
Diffstat (limited to 'Lib/test/test_cfgparser.py')
-rw-r--r-- | Lib/test/test_cfgparser.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_cfgparser.py b/Lib/test/test_cfgparser.py index 17f5ea6..90f7255 100644 --- a/Lib/test/test_cfgparser.py +++ b/Lib/test/test_cfgparser.py @@ -16,6 +16,7 @@ def basic(src): r'Internationalized Stuff', r'Long Line', r'Section\with$weird%characters[' '\t', + r'Spaces', r'Spacey Bar', ], "unexpected list of section names") @@ -26,6 +27,8 @@ def basic(src): verify(cf.get('Foo Bar', 'foo', raw=1) == 'bar') verify(cf.get('Spacey Bar', 'foo', raw=1) == 'bar') verify(cf.get('Commented Bar', 'foo', raw=1) == 'bar') + verify(cf.get('Spaces', 'key with spaces', raw=1) == 'value') + verify(cf.get('Spaces', 'another with spaces', raw=1) == 'splat!') verify('__name__' not in cf.options("Foo Bar"), '__name__ "option" should not be exposed by the API!') @@ -225,6 +228,9 @@ foo[bg]: Bulgarian foo=Default foo[en]=English foo[de]=Deutsch +[Spaces] +key with spaces : value +another with spaces = splat! """) write("""[Long Line] foo: this line is much, much longer than my editor |