diff options
author | Andrew Shadura <andrew@shadura.me> | 2015-08-20 15:58:26 +0200 |
---|---|---|
committer | Andrew Shadura <andrew@shadura.me> | 2015-08-20 15:58:26 +0200 |
commit | ff1408420159488a106492ccd11dd234967029b6 (patch) | |
tree | 473420cee1c5229a427ec4cafead1aa6c0a26800 /reconfigure/tests/parsers/ini_tests.py |
Imported Upstream version 0.1.29
Diffstat (limited to 'reconfigure/tests/parsers/ini_tests.py')
-rw-r--r-- | reconfigure/tests/parsers/ini_tests.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/reconfigure/tests/parsers/ini_tests.py b/reconfigure/tests/parsers/ini_tests.py new file mode 100644 index 0000000..cdb3c02 --- /dev/null +++ b/reconfigure/tests/parsers/ini_tests.py @@ -0,0 +1,26 @@ +from reconfigure.tests.parsers.base_test import BaseParserTest +from reconfigure.parsers import IniFileParser +from reconfigure.nodes import * + + +class IniParserTest (BaseParserTest): + parser = IniFileParser(sectionless=True) + source = """a=b + +[section1] ;section comment +s1p1=asd ;comment 2 +s1p2=123 +""" + parsed = RootNode(None, + Node(None, + PropertyNode('a', 'b'), + ), + Node('section1', + PropertyNode('s1p1', 'asd', comment='comment 2'), + PropertyNode('s1p2', '123'), + comment='section comment' + ), + ) + + +del BaseParserTest |