From 9796059c58ec315dfc9b4ed0ba37c9e9318cb3fc Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Tue, 10 Jul 2018 23:29:47 -0700 Subject: 0.5: Support dotted keys. cc #224 --- test-suite/tests/valid/dotted-keys.json | 44 +++++++++++++++++++++++++++++++++ test-suite/tests/valid/dotted-keys.toml | 9 +++++++ 2 files changed, 53 insertions(+) create mode 100644 test-suite/tests/valid/dotted-keys.json create mode 100644 test-suite/tests/valid/dotted-keys.toml (limited to 'test-suite/tests/valid') 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" } -- cgit v1.2.3 From d6f383d20c2dbefd9ece0834b05310dfae4e2a88 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Fri, 27 Jul 2018 11:49:30 -0700 Subject: Don't allow intermixing inline tables and dotted key tables. --- test-suite/tests/valid/dotted-keys.json | 10 ---------- test-suite/tests/valid/dotted-keys.toml | 4 +--- 2 files changed, 1 insertion(+), 13 deletions(-) (limited to 'test-suite/tests/valid') diff --git a/test-suite/tests/valid/dotted-keys.json b/test-suite/tests/valid/dotted-keys.json index e32079a..cf9dd04 100644 --- a/test-suite/tests/valid/dotted-keys.json +++ b/test-suite/tests/valid/dotted-keys.json @@ -19,16 +19,6 @@ } }, "in": { - "bar": { - "type": "integer", - "value": "2" - }, - "foo": { - "type": "integer", - "value": "1" - } - }, - "in2": { "type": { "color": { "type": "string", diff --git a/test-suite/tests/valid/dotted-keys.toml b/test-suite/tests/valid/dotted-keys.toml index 27dbd32..234d64c 100644 --- a/test-suite/tests/valid/dotted-keys.toml +++ b/test-suite/tests/valid/dotted-keys.toml @@ -3,7 +3,5 @@ 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" } +in = { type.name = "cat", type.color = "blue" } -- cgit v1.2.3