Skip to content

Commit 3b84c28

Browse files
committed
Add test for value with spaces in it
1 parent c6486ea commit 3b84c28

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

Python/ini_converting/ini_parser_tests.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ def parser_tests():
163163
]}
164164
]
165165
])
166+
test("spaces", [
167+
[
168+
{ "type": "property", "content": "Foo" }, { "type": "extra", "content": " " }, { "type": "extra", "content": "=" }, { "type": "extra", "content": " " }, { "type": "value", "content": "Bar Baz" },
169+
]
170+
])
166171

167172

168173
def test(filename, expected):
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Foo = Bar Baz

Python/ini_converting/ini_tokenizer_tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ def tokenizer_tests():
7777
{ "type": "TABS", "content": "\t" }, { "type": "EXTRA", "content": "//foo" }, { "type": "NEWLINES", "content": "\n" },
7878
{ "type": "TABS", "content": "\t\t" }, { "type": "WORD", "content": "C2" }, { "type": "EXTRA", "content": " " }, { "type": "EQUALS", "content": "=" }, { "type": "EXTRA", "content": " " }, { "type": "WORD", "content": "X" },
7979
])
80+
test("spaces", [
81+
{ "type": "WORD", "content": "Foo" }, { "type": "EXTRA", "content": " " }, { "type": "EQUALS", "content": "=" }, { "type": "EXTRA", "content": " " }, { "type": "WORD", "content": "Bar Baz" },
82+
])
8083

8184

8285
def test(filename, expected):

0 commit comments

Comments
 (0)