[Python-checkins] python/dist/src/Lib/test test_cfgparser.py,1.13,1.14

fdrake@users.sourceforge.net fdrake@users.sourceforge.net
Fri, 27 Sep 2002 09:21:21 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv2204/Lib/test

Modified Files:
	test_cfgparser.py 
Log Message:
Allow internal whitespace in keys.
Closes SF bug #583248; backporting to r22-maint branch.


Index: test_cfgparser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_cfgparser.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** test_cfgparser.py	27 Sep 2002 15:35:23 -0000	1.13
--- test_cfgparser.py	27 Sep 2002 16:21:18 -0000	1.14
***************
*** 17,20 ****
--- 17,21 ----
                   r'Long Line',
                   r'Section\with$weird%characters[' '\t',
+                  r'Spaces',
                   r'Spacey Bar',
                   ],
***************
*** 27,30 ****
--- 28,33 ----
      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"),
***************
*** 226,229 ****
--- 229,235 ----
  foo[en]=English
  foo[de]=Deutsch
+ [Spaces]
+ key with spaces : value
+ another with spaces = splat!
  """)
  write("""[Long Line]