From 83044a72815ba2a7cec1e6a343c6eeb091c68a30 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Wed, 6 Jun 2012 11:26:18 -0700 Subject: Adds support for bol and eol spaces to ini files * Fixes bug 1009639 * Adds tests Change-Id: Id00563dfcc6f143c3e86ec380d66cffc967b8c48 --- tests/unit/test_iniparser.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') diff --git a/tests/unit/test_iniparser.py b/tests/unit/test_iniparser.py index 5b3a0de..5d6e79f 100644 --- a/tests/unit/test_iniparser.py +++ b/tests/unit/test_iniparser.py @@ -104,6 +104,15 @@ class ParserTestCase(unittest.TestCase): self.parser.parse(lines) self.assertTrue(self.parser.comment_called) + def test_assignment_space_single_quote(self): + lines = ["foo = ' bar '"] + self.parser.parse(lines) + self.assertEquals(self.parser.values, {'': {'foo': [' bar ']}}) + + def test_assignment_space_double_quote(self): + lines = ["foo = \" bar \""] + self.parser.parse(lines) + self.assertEquals(self.parser.values, {'': {'foo': [' bar ']}}) class ExceptionTestCase(unittest.TestCase): def test_parseerror(self): -- cgit