]> granicus.if.org Git - python/commitdiff
Test section name using some strange characters, including a backslash
authorFred Drake <fdrake@acm.org>
Wed, 14 Feb 2001 15:30:31 +0000 (15:30 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 14 Feb 2001 15:30:31 +0000 (15:30 +0000)
(SF bug #132288).

Lib/test/test_cfgparser.py

index f0228b26d860ac474f5ad4bf5721a973bffacacf..e9d4ee5edc0794493c5dfb86e17b195b04671974 100644 (file)
@@ -11,8 +11,12 @@ def basic(src):
     cf.readfp(sio)
     L = cf.sections()
     L.sort()
-    verify(L == ['Commented Bar', 'Foo Bar',
-                 'Internationalized Stuff', 'Spacey Bar'],
+    verify(L == [r'Commented Bar',
+                 r'Foo Bar',
+                 r'Internationalized Stuff',
+                 r'Section\with$weird%characters[' '\t',
+                 r'Spacey Bar',
+                 ],
            "unexpected list of section names")
 
     # The use of spaces in the section names serves as a regression test for
@@ -138,6 +142,7 @@ foo=bar
 foo = bar
 [Commented Bar]
 foo: bar ; comment
+[Section\with$weird%characters[""" '\t' r"""]
 [Internationalized Stuff]
 foo[bg]: Bulgarian
 foo=Default