summaryrefslogtreecommitdiff
path: root/reconfigure/tests/parsers/jsonparser_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'reconfigure/tests/parsers/jsonparser_tests.py')
-rw-r--r--reconfigure/tests/parsers/jsonparser_tests.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/reconfigure/tests/parsers/jsonparser_tests.py b/reconfigure/tests/parsers/jsonparser_tests.py
new file mode 100644
index 0000000..1c1312e
--- /dev/null
+++ b/reconfigure/tests/parsers/jsonparser_tests.py
@@ -0,0 +1,24 @@
+from reconfigure.tests.parsers.base_test import BaseParserTest
+from reconfigure.parsers import JsonParser
+from reconfigure.nodes import *
+
+
+class JsonParserTest (BaseParserTest):
+ parser = JsonParser()
+ source = """{
+ "p2": 123,
+ "s1": {
+ "s1p1": "qwerty"
+ }
+}
+"""
+
+ parsed = RootNode(None,
+ PropertyNode('p2', 123),
+ Node('s1',
+ PropertyNode('s1p1', 'qwerty'),
+ ),
+ )
+
+
+del BaseParserTest