summaryrefslogtreecommitdiff
path: root/reconfigure/tests/parsers/squid_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'reconfigure/tests/parsers/squid_tests.py')
-rw-r--r--reconfigure/tests/parsers/squid_tests.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/reconfigure/tests/parsers/squid_tests.py b/reconfigure/tests/parsers/squid_tests.py
new file mode 100644
index 0000000..1896b5f
--- /dev/null
+++ b/reconfigure/tests/parsers/squid_tests.py
@@ -0,0 +1,29 @@
+from reconfigure.tests.parsers.base_test import BaseParserTest
+from reconfigure.parsers import SquidParser
+from reconfigure.nodes import *
+
+
+class SquidParserTest (BaseParserTest):
+ parser = SquidParser()
+ source = """# line1
+# long comment
+a\tbc
+efgh # line2
+"""
+ parsed = RootNode(None,
+ Node('line',
+ PropertyNode('name', 'a'),
+ Node('arguments',
+ PropertyNode('1', 'bc'),
+ ),
+ comment='line1\nlong comment',
+ ),
+ Node('line',
+ PropertyNode('name', 'efgh'),
+ Node('arguments'),
+ comment='line2',
+ ),
+ )
+
+
+del BaseParserTest