aboutsummaryrefslogtreecommitdiff
path: root/test-suite/tests/valid
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2018-07-10 23:29:47 -0700
committerEric Huss <eric@huss.org>2018-07-16 09:10:38 -0700
commit9796059c58ec315dfc9b4ed0ba37c9e9318cb3fc (patch)
tree52d4efec241a8332d5a58e498abcacf450733653 /test-suite/tests/valid
parent010ae9ffde22a2ed045e8042cd05db42f4adeefa (diff)
downloadmilf-rs-9796059c58ec315dfc9b4ed0ba37c9e9318cb3fc.tar.gz
milf-rs-9796059c58ec315dfc9b4ed0ba37c9e9318cb3fc.zip
0.5: Support dotted keys.
cc #224
Diffstat (limited to 'test-suite/tests/valid')
-rw-r--r--test-suite/tests/valid/dotted-keys.json44
-rw-r--r--test-suite/tests/valid/dotted-keys.toml9
2 files changed, 53 insertions, 0 deletions
diff --git a/test-suite/tests/valid/dotted-keys.json b/test-suite/tests/valid/dotted-keys.json
new file mode 100644
index 0000000..e32079a
--- /dev/null
+++ b/test-suite/tests/valid/dotted-keys.json
@@ -0,0 +1,44 @@
+{
+ "a": {
+ "b": {
+ "type": "integer",
+ "value": "123"
+ }
+ },
+ "table": {
+ "a": {
+ "b": {
+ "c": {
+ "type": "integer",
+ "value": "1"
+ },
+ "d": {
+ "type": "integer",
+ "value": "2"
+ }
+ }
+ },
+ "in": {
+ "bar": {
+ "type": "integer",
+ "value": "2"
+ },
+ "foo": {
+ "type": "integer",
+ "value": "1"
+ }
+ },
+ "in2": {
+ "type": {
+ "color": {
+ "type": "string",
+ "value": "blue"
+ },
+ "name": {
+ "type": "string",
+ "value": "cat"
+ }
+ }
+ }
+ }
+}
diff --git a/test-suite/tests/valid/dotted-keys.toml b/test-suite/tests/valid/dotted-keys.toml
new file mode 100644
index 0000000..27dbd32
--- /dev/null
+++ b/test-suite/tests/valid/dotted-keys.toml
@@ -0,0 +1,9 @@
+a.b = 123
+
+[table]
+a.b.c = 1
+a . b . d = 2
+in = {foo = 1}
+in.bar = 2
+
+in2 = { type.name = "cat", type.color = "blue" }