From 7bbbfd046324363c8db1fb15d39aeb02fe7331b5 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Sun, 21 Mar 2021 14:10:24 -0600 Subject: hilarious and original joke --- test-suite/tests/valid/array-empty.milf | 1 + test-suite/tests/valid/array-empty.toml | 1 - .../valid/array-mixed-types-arrays-and-ints.milf | 1 + .../valid/array-mixed-types-arrays-and-ints.toml | 1 - .../valid/array-mixed-types-ints-and-floats.milf | 1 + .../valid/array-mixed-types-ints-and-floats.toml | 1 - .../valid/array-mixed-types-strings-and-ints.milf | 1 + .../valid/array-mixed-types-strings-and-ints.toml | 1 - test-suite/tests/valid/array-nospaces.milf | 1 + test-suite/tests/valid/array-nospaces.toml | 1 - test-suite/tests/valid/arrays-hetergeneous.milf | 1 + test-suite/tests/valid/arrays-hetergeneous.toml | 1 - test-suite/tests/valid/arrays-nested.milf | 1 + test-suite/tests/valid/arrays-nested.toml | 1 - test-suite/tests/valid/arrays.milf | 8 + test-suite/tests/valid/arrays.toml | 8 - test-suite/tests/valid/bool.milf | 2 + test-suite/tests/valid/bool.toml | 2 - test-suite/tests/valid/comments-everywhere.milf | 24 +++ test-suite/tests/valid/comments-everywhere.toml | 24 --- test-suite/tests/valid/datetime-truncate.milf | 1 + test-suite/tests/valid/datetime-truncate.toml | 1 - test-suite/tests/valid/datetime.milf | 1 + test-suite/tests/valid/datetime.toml | 1 - test-suite/tests/valid/dotted-keys.milf | 7 + test-suite/tests/valid/dotted-keys.toml | 7 - test-suite/tests/valid/empty.milf | 0 test-suite/tests/valid/empty.toml | 0 test-suite/tests/valid/example-bom.milf | 5 + test-suite/tests/valid/example-bom.toml | 5 - test-suite/tests/valid/example-v0.3.0.milf | 182 ++++++++++++++++ test-suite/tests/valid/example-v0.3.0.toml | 182 ---------------- test-suite/tests/valid/example-v0.4.0.milf | 236 +++++++++++++++++++++ test-suite/tests/valid/example-v0.4.0.toml | 236 --------------------- test-suite/tests/valid/example.milf | 5 + test-suite/tests/valid/example.toml | 5 - test-suite/tests/valid/example2.json | 2 +- test-suite/tests/valid/example2.milf | 47 ++++ test-suite/tests/valid/example2.toml | 47 ---- test-suite/tests/valid/float-exponent.milf | 9 + test-suite/tests/valid/float-exponent.toml | 9 - test-suite/tests/valid/float.milf | 2 + test-suite/tests/valid/float.toml | 2 - test-suite/tests/valid/hard_example.milf | 33 +++ test-suite/tests/valid/hard_example.toml | 33 --- .../tests/valid/implicit-and-explicit-after.milf | 5 + .../tests/valid/implicit-and-explicit-after.toml | 5 - .../tests/valid/implicit-and-explicit-before.milf | 5 + .../tests/valid/implicit-and-explicit-before.toml | 5 - test-suite/tests/valid/implicit-groups.milf | 2 + test-suite/tests/valid/implicit-groups.toml | 2 - test-suite/tests/valid/integer.milf | 18 ++ test-suite/tests/valid/integer.toml | 18 -- test-suite/tests/valid/key-equals-nospace.milf | 1 + test-suite/tests/valid/key-equals-nospace.toml | 1 - test-suite/tests/valid/key-quote-newline.milf | 1 + test-suite/tests/valid/key-quote-newline.toml | 1 - test-suite/tests/valid/key-space.milf | 1 + test-suite/tests/valid/key-space.toml | 1 - test-suite/tests/valid/key-special-chars.milf | 1 + test-suite/tests/valid/key-special-chars.toml | 1 - test-suite/tests/valid/key-with-pound.milf | 1 + test-suite/tests/valid/key-with-pound.toml | 1 - test-suite/tests/valid/long-float.milf | 2 + test-suite/tests/valid/long-float.toml | 2 - test-suite/tests/valid/long-integer.milf | 2 + test-suite/tests/valid/long-integer.toml | 2 - test-suite/tests/valid/multiline-string.milf | 34 +++ test-suite/tests/valid/multiline-string.toml | 34 --- test-suite/tests/valid/quote-surrounded-value.milf | 2 + test-suite/tests/valid/quote-surrounded-value.toml | 2 - test-suite/tests/valid/raw-multiline-string.milf | 9 + test-suite/tests/valid/raw-multiline-string.toml | 9 - test-suite/tests/valid/raw-string.milf | 7 + test-suite/tests/valid/raw-string.toml | 7 - test-suite/tests/valid/string-delim-end.milf | 3 + test-suite/tests/valid/string-delim-end.toml | 3 - test-suite/tests/valid/string-empty.milf | 1 + test-suite/tests/valid/string-empty.toml | 1 - test-suite/tests/valid/string-escapes.milf | 14 ++ test-suite/tests/valid/string-escapes.toml | 14 -- test-suite/tests/valid/string-simple.milf | 1 + test-suite/tests/valid/string-simple.toml | 1 - test-suite/tests/valid/string-with-pound.milf | 2 + test-suite/tests/valid/string-with-pound.toml | 2 - test-suite/tests/valid/table-array-implicit.milf | 2 + test-suite/tests/valid/table-array-implicit.toml | 2 - test-suite/tests/valid/table-array-many.milf | 11 + test-suite/tests/valid/table-array-many.toml | 11 - .../tests/valid/table-array-nest-no-keys.milf | 6 + .../tests/valid/table-array-nest-no-keys.toml | 6 - test-suite/tests/valid/table-array-nest.milf | 17 ++ test-suite/tests/valid/table-array-nest.toml | 17 -- test-suite/tests/valid/table-array-one.milf | 3 + test-suite/tests/valid/table-array-one.toml | 3 - test-suite/tests/valid/table-empty.milf | 1 + test-suite/tests/valid/table-empty.toml | 1 - test-suite/tests/valid/table-multi-empty.milf | 5 + test-suite/tests/valid/table-multi-empty.toml | 5 - test-suite/tests/valid/table-sub-empty.milf | 2 + test-suite/tests/valid/table-sub-empty.toml | 2 - test-suite/tests/valid/table-whitespace.milf | 1 + test-suite/tests/valid/table-whitespace.toml | 1 - test-suite/tests/valid/table-with-pound.milf | 2 + test-suite/tests/valid/table-with-pound.toml | 2 - test-suite/tests/valid/unicode-escape.milf | 6 + test-suite/tests/valid/unicode-escape.toml | 6 - test-suite/tests/valid/unicode-literal.milf | 1 + test-suite/tests/valid/unicode-literal.toml | 1 - 109 files changed, 739 insertions(+), 739 deletions(-) create mode 100644 test-suite/tests/valid/array-empty.milf delete mode 100644 test-suite/tests/valid/array-empty.toml create mode 100644 test-suite/tests/valid/array-mixed-types-arrays-and-ints.milf delete mode 100644 test-suite/tests/valid/array-mixed-types-arrays-and-ints.toml create mode 100644 test-suite/tests/valid/array-mixed-types-ints-and-floats.milf delete mode 100644 test-suite/tests/valid/array-mixed-types-ints-and-floats.toml create mode 100644 test-suite/tests/valid/array-mixed-types-strings-and-ints.milf delete mode 100644 test-suite/tests/valid/array-mixed-types-strings-and-ints.toml create mode 100644 test-suite/tests/valid/array-nospaces.milf delete mode 100644 test-suite/tests/valid/array-nospaces.toml create mode 100644 test-suite/tests/valid/arrays-hetergeneous.milf delete mode 100644 test-suite/tests/valid/arrays-hetergeneous.toml create mode 100644 test-suite/tests/valid/arrays-nested.milf delete mode 100644 test-suite/tests/valid/arrays-nested.toml create mode 100644 test-suite/tests/valid/arrays.milf delete mode 100644 test-suite/tests/valid/arrays.toml create mode 100644 test-suite/tests/valid/bool.milf delete mode 100644 test-suite/tests/valid/bool.toml create mode 100644 test-suite/tests/valid/comments-everywhere.milf delete mode 100644 test-suite/tests/valid/comments-everywhere.toml create mode 100644 test-suite/tests/valid/datetime-truncate.milf delete mode 100644 test-suite/tests/valid/datetime-truncate.toml create mode 100644 test-suite/tests/valid/datetime.milf delete mode 100644 test-suite/tests/valid/datetime.toml create mode 100644 test-suite/tests/valid/dotted-keys.milf delete mode 100644 test-suite/tests/valid/dotted-keys.toml create mode 100644 test-suite/tests/valid/empty.milf delete mode 100644 test-suite/tests/valid/empty.toml create mode 100644 test-suite/tests/valid/example-bom.milf delete mode 100644 test-suite/tests/valid/example-bom.toml create mode 100644 test-suite/tests/valid/example-v0.3.0.milf delete mode 100644 test-suite/tests/valid/example-v0.3.0.toml create mode 100644 test-suite/tests/valid/example-v0.4.0.milf delete mode 100644 test-suite/tests/valid/example-v0.4.0.toml create mode 100644 test-suite/tests/valid/example.milf delete mode 100644 test-suite/tests/valid/example.toml create mode 100644 test-suite/tests/valid/example2.milf delete mode 100644 test-suite/tests/valid/example2.toml create mode 100644 test-suite/tests/valid/float-exponent.milf delete mode 100644 test-suite/tests/valid/float-exponent.toml create mode 100644 test-suite/tests/valid/float.milf delete mode 100644 test-suite/tests/valid/float.toml create mode 100644 test-suite/tests/valid/hard_example.milf delete mode 100644 test-suite/tests/valid/hard_example.toml create mode 100644 test-suite/tests/valid/implicit-and-explicit-after.milf delete mode 100644 test-suite/tests/valid/implicit-and-explicit-after.toml create mode 100644 test-suite/tests/valid/implicit-and-explicit-before.milf delete mode 100644 test-suite/tests/valid/implicit-and-explicit-before.toml create mode 100644 test-suite/tests/valid/implicit-groups.milf delete mode 100644 test-suite/tests/valid/implicit-groups.toml create mode 100644 test-suite/tests/valid/integer.milf delete mode 100644 test-suite/tests/valid/integer.toml create mode 100644 test-suite/tests/valid/key-equals-nospace.milf delete mode 100644 test-suite/tests/valid/key-equals-nospace.toml create mode 100644 test-suite/tests/valid/key-quote-newline.milf delete mode 100644 test-suite/tests/valid/key-quote-newline.toml create mode 100644 test-suite/tests/valid/key-space.milf delete mode 100644 test-suite/tests/valid/key-space.toml create mode 100644 test-suite/tests/valid/key-special-chars.milf delete mode 100644 test-suite/tests/valid/key-special-chars.toml create mode 100644 test-suite/tests/valid/key-with-pound.milf delete mode 100644 test-suite/tests/valid/key-with-pound.toml create mode 100644 test-suite/tests/valid/long-float.milf delete mode 100644 test-suite/tests/valid/long-float.toml create mode 100644 test-suite/tests/valid/long-integer.milf delete mode 100644 test-suite/tests/valid/long-integer.toml create mode 100644 test-suite/tests/valid/multiline-string.milf delete mode 100644 test-suite/tests/valid/multiline-string.toml create mode 100644 test-suite/tests/valid/quote-surrounded-value.milf delete mode 100644 test-suite/tests/valid/quote-surrounded-value.toml create mode 100644 test-suite/tests/valid/raw-multiline-string.milf delete mode 100644 test-suite/tests/valid/raw-multiline-string.toml create mode 100644 test-suite/tests/valid/raw-string.milf delete mode 100644 test-suite/tests/valid/raw-string.toml create mode 100644 test-suite/tests/valid/string-delim-end.milf delete mode 100644 test-suite/tests/valid/string-delim-end.toml create mode 100644 test-suite/tests/valid/string-empty.milf delete mode 100644 test-suite/tests/valid/string-empty.toml create mode 100644 test-suite/tests/valid/string-escapes.milf delete mode 100644 test-suite/tests/valid/string-escapes.toml create mode 100644 test-suite/tests/valid/string-simple.milf delete mode 100644 test-suite/tests/valid/string-simple.toml create mode 100644 test-suite/tests/valid/string-with-pound.milf delete mode 100644 test-suite/tests/valid/string-with-pound.toml create mode 100644 test-suite/tests/valid/table-array-implicit.milf delete mode 100644 test-suite/tests/valid/table-array-implicit.toml create mode 100644 test-suite/tests/valid/table-array-many.milf delete mode 100644 test-suite/tests/valid/table-array-many.toml create mode 100644 test-suite/tests/valid/table-array-nest-no-keys.milf delete mode 100644 test-suite/tests/valid/table-array-nest-no-keys.toml create mode 100644 test-suite/tests/valid/table-array-nest.milf delete mode 100644 test-suite/tests/valid/table-array-nest.toml create mode 100644 test-suite/tests/valid/table-array-one.milf delete mode 100644 test-suite/tests/valid/table-array-one.toml create mode 100644 test-suite/tests/valid/table-empty.milf delete mode 100644 test-suite/tests/valid/table-empty.toml create mode 100644 test-suite/tests/valid/table-multi-empty.milf delete mode 100644 test-suite/tests/valid/table-multi-empty.toml create mode 100644 test-suite/tests/valid/table-sub-empty.milf delete mode 100644 test-suite/tests/valid/table-sub-empty.toml create mode 100644 test-suite/tests/valid/table-whitespace.milf delete mode 100644 test-suite/tests/valid/table-whitespace.toml create mode 100644 test-suite/tests/valid/table-with-pound.milf delete mode 100644 test-suite/tests/valid/table-with-pound.toml create mode 100644 test-suite/tests/valid/unicode-escape.milf delete mode 100644 test-suite/tests/valid/unicode-escape.toml create mode 100644 test-suite/tests/valid/unicode-literal.milf delete mode 100644 test-suite/tests/valid/unicode-literal.toml (limited to 'test-suite/tests/valid') diff --git a/test-suite/tests/valid/array-empty.milf b/test-suite/tests/valid/array-empty.milf new file mode 100644 index 0000000..fa58dc6 --- /dev/null +++ b/test-suite/tests/valid/array-empty.milf @@ -0,0 +1 @@ +thevoid = [[[[[]]]]] diff --git a/test-suite/tests/valid/array-empty.toml b/test-suite/tests/valid/array-empty.toml deleted file mode 100644 index fa58dc6..0000000 --- a/test-suite/tests/valid/array-empty.toml +++ /dev/null @@ -1 +0,0 @@ -thevoid = [[[[[]]]]] diff --git a/test-suite/tests/valid/array-mixed-types-arrays-and-ints.milf b/test-suite/tests/valid/array-mixed-types-arrays-and-ints.milf new file mode 100644 index 0000000..051ec73 --- /dev/null +++ b/test-suite/tests/valid/array-mixed-types-arrays-and-ints.milf @@ -0,0 +1 @@ +arrays-and-ints = [1, ["Arrays are not integers."]] diff --git a/test-suite/tests/valid/array-mixed-types-arrays-and-ints.toml b/test-suite/tests/valid/array-mixed-types-arrays-and-ints.toml deleted file mode 100644 index 051ec73..0000000 --- a/test-suite/tests/valid/array-mixed-types-arrays-and-ints.toml +++ /dev/null @@ -1 +0,0 @@ -arrays-and-ints = [1, ["Arrays are not integers."]] diff --git a/test-suite/tests/valid/array-mixed-types-ints-and-floats.milf b/test-suite/tests/valid/array-mixed-types-ints-and-floats.milf new file mode 100644 index 0000000..a5aa9b7 --- /dev/null +++ b/test-suite/tests/valid/array-mixed-types-ints-and-floats.milf @@ -0,0 +1 @@ +ints-and-floats = [1, 1.1] diff --git a/test-suite/tests/valid/array-mixed-types-ints-and-floats.toml b/test-suite/tests/valid/array-mixed-types-ints-and-floats.toml deleted file mode 100644 index a5aa9b7..0000000 --- a/test-suite/tests/valid/array-mixed-types-ints-and-floats.toml +++ /dev/null @@ -1 +0,0 @@ -ints-and-floats = [1, 1.1] diff --git a/test-suite/tests/valid/array-mixed-types-strings-and-ints.milf b/test-suite/tests/valid/array-mixed-types-strings-and-ints.milf new file mode 100644 index 0000000..f348308 --- /dev/null +++ b/test-suite/tests/valid/array-mixed-types-strings-and-ints.milf @@ -0,0 +1 @@ +strings-and-ints = ["hi", 42] diff --git a/test-suite/tests/valid/array-mixed-types-strings-and-ints.toml b/test-suite/tests/valid/array-mixed-types-strings-and-ints.toml deleted file mode 100644 index f348308..0000000 --- a/test-suite/tests/valid/array-mixed-types-strings-and-ints.toml +++ /dev/null @@ -1 +0,0 @@ -strings-and-ints = ["hi", 42] diff --git a/test-suite/tests/valid/array-nospaces.milf b/test-suite/tests/valid/array-nospaces.milf new file mode 100644 index 0000000..6618936 --- /dev/null +++ b/test-suite/tests/valid/array-nospaces.milf @@ -0,0 +1 @@ +ints = [1,2,3] diff --git a/test-suite/tests/valid/array-nospaces.toml b/test-suite/tests/valid/array-nospaces.toml deleted file mode 100644 index 6618936..0000000 --- a/test-suite/tests/valid/array-nospaces.toml +++ /dev/null @@ -1 +0,0 @@ -ints = [1,2,3] diff --git a/test-suite/tests/valid/arrays-hetergeneous.milf b/test-suite/tests/valid/arrays-hetergeneous.milf new file mode 100644 index 0000000..a246fcf --- /dev/null +++ b/test-suite/tests/valid/arrays-hetergeneous.milf @@ -0,0 +1 @@ +mixed = [[1, 2], ["a", "b"], [1.1, 2.1]] diff --git a/test-suite/tests/valid/arrays-hetergeneous.toml b/test-suite/tests/valid/arrays-hetergeneous.toml deleted file mode 100644 index a246fcf..0000000 --- a/test-suite/tests/valid/arrays-hetergeneous.toml +++ /dev/null @@ -1 +0,0 @@ -mixed = [[1, 2], ["a", "b"], [1.1, 2.1]] diff --git a/test-suite/tests/valid/arrays-nested.milf b/test-suite/tests/valid/arrays-nested.milf new file mode 100644 index 0000000..ce33022 --- /dev/null +++ b/test-suite/tests/valid/arrays-nested.milf @@ -0,0 +1 @@ +nest = [["a"], ["b"]] diff --git a/test-suite/tests/valid/arrays-nested.toml b/test-suite/tests/valid/arrays-nested.toml deleted file mode 100644 index ce33022..0000000 --- a/test-suite/tests/valid/arrays-nested.toml +++ /dev/null @@ -1 +0,0 @@ -nest = [["a"], ["b"]] diff --git a/test-suite/tests/valid/arrays.milf b/test-suite/tests/valid/arrays.milf new file mode 100644 index 0000000..c435f57 --- /dev/null +++ b/test-suite/tests/valid/arrays.milf @@ -0,0 +1,8 @@ +ints = [1, 2, 3] +floats = [1.1, 2.1, 3.1] +strings = ["a", "b", "c"] +dates = [ + 1987-07-05T17:45:00Z, + 1979-05-27T07:32:00Z, + 2006-06-01T11:00:00Z, +] diff --git a/test-suite/tests/valid/arrays.toml b/test-suite/tests/valid/arrays.toml deleted file mode 100644 index c435f57..0000000 --- a/test-suite/tests/valid/arrays.toml +++ /dev/null @@ -1,8 +0,0 @@ -ints = [1, 2, 3] -floats = [1.1, 2.1, 3.1] -strings = ["a", "b", "c"] -dates = [ - 1987-07-05T17:45:00Z, - 1979-05-27T07:32:00Z, - 2006-06-01T11:00:00Z, -] diff --git a/test-suite/tests/valid/bool.milf b/test-suite/tests/valid/bool.milf new file mode 100644 index 0000000..a8a829b --- /dev/null +++ b/test-suite/tests/valid/bool.milf @@ -0,0 +1,2 @@ +t = true +f = false diff --git a/test-suite/tests/valid/bool.toml b/test-suite/tests/valid/bool.toml deleted file mode 100644 index a8a829b..0000000 --- a/test-suite/tests/valid/bool.toml +++ /dev/null @@ -1,2 +0,0 @@ -t = true -f = false diff --git a/test-suite/tests/valid/comments-everywhere.milf b/test-suite/tests/valid/comments-everywhere.milf new file mode 100644 index 0000000..3dca74c --- /dev/null +++ b/test-suite/tests/valid/comments-everywhere.milf @@ -0,0 +1,24 @@ +# Top comment. + # Top comment. +# Top comment. + +# [no-extraneous-groups-please] + +[group] # Comment +answer = 42 # Comment +# no-extraneous-keys-please = 999 +# Inbetween comment. +more = [ # Comment + # What about multiple # comments? + # Can you handle it? + # + # Evil. +# Evil. + 42, 42, # Comments within arrays are fun. + # What about multiple # comments? + # Can you handle it? + # + # Evil. +# Evil. +# ] Did I fool you? +] # Hopefully not. diff --git a/test-suite/tests/valid/comments-everywhere.toml b/test-suite/tests/valid/comments-everywhere.toml deleted file mode 100644 index 3dca74c..0000000 --- a/test-suite/tests/valid/comments-everywhere.toml +++ /dev/null @@ -1,24 +0,0 @@ -# Top comment. - # Top comment. -# Top comment. - -# [no-extraneous-groups-please] - -[group] # Comment -answer = 42 # Comment -# no-extraneous-keys-please = 999 -# Inbetween comment. -more = [ # Comment - # What about multiple # comments? - # Can you handle it? - # - # Evil. -# Evil. - 42, 42, # Comments within arrays are fun. - # What about multiple # comments? - # Can you handle it? - # - # Evil. -# Evil. -# ] Did I fool you? -] # Hopefully not. diff --git a/test-suite/tests/valid/datetime-truncate.milf b/test-suite/tests/valid/datetime-truncate.milf new file mode 100644 index 0000000..05de841 --- /dev/null +++ b/test-suite/tests/valid/datetime-truncate.milf @@ -0,0 +1 @@ +bestdayever = 1987-07-05T17:45:00.123456789012345Z diff --git a/test-suite/tests/valid/datetime-truncate.toml b/test-suite/tests/valid/datetime-truncate.toml deleted file mode 100644 index 05de841..0000000 --- a/test-suite/tests/valid/datetime-truncate.toml +++ /dev/null @@ -1 +0,0 @@ -bestdayever = 1987-07-05T17:45:00.123456789012345Z diff --git a/test-suite/tests/valid/datetime.milf b/test-suite/tests/valid/datetime.milf new file mode 100644 index 0000000..2e99340 --- /dev/null +++ b/test-suite/tests/valid/datetime.milf @@ -0,0 +1 @@ +bestdayever = 1987-07-05T17:45:00Z diff --git a/test-suite/tests/valid/datetime.toml b/test-suite/tests/valid/datetime.toml deleted file mode 100644 index 2e99340..0000000 --- a/test-suite/tests/valid/datetime.toml +++ /dev/null @@ -1 +0,0 @@ -bestdayever = 1987-07-05T17:45:00Z diff --git a/test-suite/tests/valid/dotted-keys.milf b/test-suite/tests/valid/dotted-keys.milf new file mode 100644 index 0000000..234d64c --- /dev/null +++ b/test-suite/tests/valid/dotted-keys.milf @@ -0,0 +1,7 @@ +a.b = 123 + +[table] +a.b.c = 1 +a . b . d = 2 + +in = { type.name = "cat", type.color = "blue" } diff --git a/test-suite/tests/valid/dotted-keys.toml b/test-suite/tests/valid/dotted-keys.toml deleted file mode 100644 index 234d64c..0000000 --- a/test-suite/tests/valid/dotted-keys.toml +++ /dev/null @@ -1,7 +0,0 @@ -a.b = 123 - -[table] -a.b.c = 1 -a . b . d = 2 - -in = { type.name = "cat", type.color = "blue" } diff --git a/test-suite/tests/valid/empty.milf b/test-suite/tests/valid/empty.milf new file mode 100644 index 0000000..e69de29 diff --git a/test-suite/tests/valid/empty.toml b/test-suite/tests/valid/empty.toml deleted file mode 100644 index e69de29..0000000 diff --git a/test-suite/tests/valid/example-bom.milf b/test-suite/tests/valid/example-bom.milf new file mode 100644 index 0000000..fb5ac81 --- /dev/null +++ b/test-suite/tests/valid/example-bom.milf @@ -0,0 +1,5 @@ +best-day-ever = 1987-07-05T17:45:00Z + +[numtheory] +boring = false +perfection = [6, 28, 496] diff --git a/test-suite/tests/valid/example-bom.toml b/test-suite/tests/valid/example-bom.toml deleted file mode 100644 index fb5ac81..0000000 --- a/test-suite/tests/valid/example-bom.toml +++ /dev/null @@ -1,5 +0,0 @@ -best-day-ever = 1987-07-05T17:45:00Z - -[numtheory] -boring = false -perfection = [6, 28, 496] diff --git a/test-suite/tests/valid/example-v0.3.0.milf b/test-suite/tests/valid/example-v0.3.0.milf new file mode 100644 index 0000000..dff4c8a --- /dev/null +++ b/test-suite/tests/valid/example-v0.3.0.milf @@ -0,0 +1,182 @@ +# Comment +# I am a comment. Hear me roar. Roar. + +# Table +# Tables (also known as hash tables or dictionaries) are collections of key/value pairs. +# They appear in square brackets on a line by themselves. + +[Table] + +key = "value" # Yeah, you can do this. + +# Nested tables are denoted by table names with dots in them. Name your tables whatever crap you please, just don't use #, ., [ or ]. + +[dog.tater] +type = "pug" + +# You don't need to specify all the super-tables if you don't want to. MILF knows how to do it for you. + +# [x] you +# [x.y] don't +# [x.y.z] need these +[x.y.z.w] # for this to work + +# String +# There are four ways to express strings: basic, multi-line basic, literal, and multi-line literal. +# All strings must contain only valid UTF-8 characters. + +[String] +basic = "I'm a string. \"You can quote me\". Name\tJos\u00E9\nLocation\tSF." + +[String.Multiline] + +# The following strings are byte-for-byte equivalent: +key1 = "One\nTwo" +key2 = """One\nTwo""" +key3 = """ +One +Two""" + +[String.Multilined.Singleline] + +# The following strings are byte-for-byte equivalent: +key1 = "The quick brown fox jumps over the lazy dog." + +key2 = """ +The quick brown \ + + + fox jumps over \ + the lazy dog.""" + +key3 = """\ + The quick brown \ + fox jumps over \ + the lazy dog.\ + """ + +[String.Literal] + +# What you see is what you get. +winpath = 'C:\Users\nodejs\templates' +winpath2 = '\\ServerX\admin$\system32\' +quoted = 'Tom "Dubs" Preston-Werner' +regex = '<\i\c*\s*>' + + +[String.Literal.Multiline] + +regex2 = '''I [dw]on't need \d{2} apples''' +lines = ''' +The first newline is +trimmed in raw strings. + All other whitespace + is preserved. +''' + +# Integer +# Integers are whole numbers. Positive numbers may be prefixed with a plus sign. +# Negative numbers are prefixed with a minus sign. + +[Integer] +key1 = +99 +key2 = 42 +key3 = 0 +key4 = -17 + +# Float +# A float consists of an integer part (which may be prefixed with a plus or minus sign) +# followed by a fractional part and/or an exponent part. + +[Float.fractional] + +# fractional +key1 = +1.0 +key2 = 3.1415 +key3 = -0.01 + +[Float.exponent] + +# exponent +#key1 = 5e+22 +#key2 = 1e6 +#key3 = -2E-2 + +[Float.both] + +# both +#key = 6.626e-34 + +# Boolean +# Booleans are just the tokens you're used to. Always lowercase. + +[Booleans] +True = true +False = false + +# Datetime +# Datetimes are RFC 3339 dates. + +[Datetime] +key1 = 1979-05-27T07:32:00Z +#key2 = 1979-05-27T00:32:00-07:00 +#key3 = 1979-05-27T00:32:00.999999-07:00 + +# Array +# Arrays are square brackets with other primitives inside. Whitespace is ignored. Elements are separated by commas. Data types may not be mixed. + +[Array] +key1 = [ 1, 2, 3 ] +key2 = [ "red", "yellow", "green" ] +key3 = [ [ 1, 2 ], [3, 4, 5] ] +key4 = [ [ 1, 2 ], ["a", "b", "c"] ] # this is ok + +#Arrays can also be multiline. So in addition to ignoring whitespace, arrays also ignore newlines between the brackets. +# Terminating commas are ok before the closing bracket. + +key5 = [ + 1, 2, 3 +] +key6 = [ + 1, + 2, # this is ok +] + +# Array of Tables +# These can be expressed by using a table name in double brackets. +# Each table with the same double bracketed name will be an element in the array. +# The tables are inserted in the order encountered. + +[[products]] +name = "Hammer" +sku = 738594937 + +[[products]] + +[[products]] +name = "Nail" +sku = 284758393 +color = "gray" + + +# You can create nested arrays of tables as well. + +[[fruit]] + name = "apple" + + [fruit.physical] + color = "red" + shape = "round" + + [[fruit.variety]] + name = "red delicious" + + [[fruit.variety]] + name = "granny smith" + +[[fruit]] + name = "banana" + + [[fruit.variety]] + name = "plantain" + diff --git a/test-suite/tests/valid/example-v0.3.0.toml b/test-suite/tests/valid/example-v0.3.0.toml deleted file mode 100644 index 76aacc3..0000000 --- a/test-suite/tests/valid/example-v0.3.0.toml +++ /dev/null @@ -1,182 +0,0 @@ -# Comment -# I am a comment. Hear me roar. Roar. - -# Table -# Tables (also known as hash tables or dictionaries) are collections of key/value pairs. -# They appear in square brackets on a line by themselves. - -[Table] - -key = "value" # Yeah, you can do this. - -# Nested tables are denoted by table names with dots in them. Name your tables whatever crap you please, just don't use #, ., [ or ]. - -[dog.tater] -type = "pug" - -# You don't need to specify all the super-tables if you don't want to. TOML knows how to do it for you. - -# [x] you -# [x.y] don't -# [x.y.z] need these -[x.y.z.w] # for this to work - -# String -# There are four ways to express strings: basic, multi-line basic, literal, and multi-line literal. -# All strings must contain only valid UTF-8 characters. - -[String] -basic = "I'm a string. \"You can quote me\". Name\tJos\u00E9\nLocation\tSF." - -[String.Multiline] - -# The following strings are byte-for-byte equivalent: -key1 = "One\nTwo" -key2 = """One\nTwo""" -key3 = """ -One -Two""" - -[String.Multilined.Singleline] - -# The following strings are byte-for-byte equivalent: -key1 = "The quick brown fox jumps over the lazy dog." - -key2 = """ -The quick brown \ - - - fox jumps over \ - the lazy dog.""" - -key3 = """\ - The quick brown \ - fox jumps over \ - the lazy dog.\ - """ - -[String.Literal] - -# What you see is what you get. -winpath = 'C:\Users\nodejs\templates' -winpath2 = '\\ServerX\admin$\system32\' -quoted = 'Tom "Dubs" Preston-Werner' -regex = '<\i\c*\s*>' - - -[String.Literal.Multiline] - -regex2 = '''I [dw]on't need \d{2} apples''' -lines = ''' -The first newline is -trimmed in raw strings. - All other whitespace - is preserved. -''' - -# Integer -# Integers are whole numbers. Positive numbers may be prefixed with a plus sign. -# Negative numbers are prefixed with a minus sign. - -[Integer] -key1 = +99 -key2 = 42 -key3 = 0 -key4 = -17 - -# Float -# A float consists of an integer part (which may be prefixed with a plus or minus sign) -# followed by a fractional part and/or an exponent part. - -[Float.fractional] - -# fractional -key1 = +1.0 -key2 = 3.1415 -key3 = -0.01 - -[Float.exponent] - -# exponent -#key1 = 5e+22 -#key2 = 1e6 -#key3 = -2E-2 - -[Float.both] - -# both -#key = 6.626e-34 - -# Boolean -# Booleans are just the tokens you're used to. Always lowercase. - -[Booleans] -True = true -False = false - -# Datetime -# Datetimes are RFC 3339 dates. - -[Datetime] -key1 = 1979-05-27T07:32:00Z -#key2 = 1979-05-27T00:32:00-07:00 -#key3 = 1979-05-27T00:32:00.999999-07:00 - -# Array -# Arrays are square brackets with other primitives inside. Whitespace is ignored. Elements are separated by commas. Data types may not be mixed. - -[Array] -key1 = [ 1, 2, 3 ] -key2 = [ "red", "yellow", "green" ] -key3 = [ [ 1, 2 ], [3, 4, 5] ] -key4 = [ [ 1, 2 ], ["a", "b", "c"] ] # this is ok - -#Arrays can also be multiline. So in addition to ignoring whitespace, arrays also ignore newlines between the brackets. -# Terminating commas are ok before the closing bracket. - -key5 = [ - 1, 2, 3 -] -key6 = [ - 1, - 2, # this is ok -] - -# Array of Tables -# These can be expressed by using a table name in double brackets. -# Each table with the same double bracketed name will be an element in the array. -# The tables are inserted in the order encountered. - -[[products]] -name = "Hammer" -sku = 738594937 - -[[products]] - -[[products]] -name = "Nail" -sku = 284758393 -color = "gray" - - -# You can create nested arrays of tables as well. - -[[fruit]] - name = "apple" - - [fruit.physical] - color = "red" - shape = "round" - - [[fruit.variety]] - name = "red delicious" - - [[fruit.variety]] - name = "granny smith" - -[[fruit]] - name = "banana" - - [[fruit.variety]] - name = "plantain" - diff --git a/test-suite/tests/valid/example-v0.4.0.milf b/test-suite/tests/valid/example-v0.4.0.milf new file mode 100644 index 0000000..061e3c8 --- /dev/null +++ b/test-suite/tests/valid/example-v0.4.0.milf @@ -0,0 +1,236 @@ +################################################################################ +## Comment + +# Speak your mind with the hash symbol. They go from the symbol to the end of +# the line. + + +################################################################################ +## Table + +# Tables (also known as hash tables or dictionaries) are collections of +# key/value pairs. They appear in square brackets on a line by themselves. + +[table] + +key = "value" # Yeah, you can do this. + +# Nested tables are denoted by table names with dots in them. Name your tables +# whatever crap you please, just don't use #, ., [ or ]. + +[table.subtable] + +key = "another value" + +# You don't need to specify all the super-tables if you don't want to. MILF +# knows how to do it for you. + +# [x] you +# [x.y] don't +# [x.y.z] need these +[x.y.z.w] # for this to work + + +################################################################################ +## Inline Table + +# Inline tables provide a more compact syntax for expressing tables. They are +# especially useful for grouped data that can otherwise quickly become verbose. +# Inline tables are enclosed in curly braces `{` and `}`. No newlines are +# allowed between the curly braces unless they are valid within a value. + +[table.inline] + +name = { first = "Tom", last = "Preston-Werner" } +point = { x = 1, y = 2 } + + +################################################################################ +## String + +# There are four ways to express strings: basic, multi-line basic, literal, and +# multi-line literal. All strings must contain only valid UTF-8 characters. + +[string.basic] + +basic = "I'm a string. \"You can quote me\". Name\tJos\u00E9\nLocation\tSF." + +[string.multiline] + +# The following strings are byte-for-byte equivalent: +key1 = "One\nTwo" +key2 = """One\nTwo""" +key3 = """ +One +Two""" + +[string.multiline.continued] + +# The following strings are byte-for-byte equivalent: +key1 = "The quick brown fox jumps over the lazy dog." + +key2 = """ +The quick brown \ + + + fox jumps over \ + the lazy dog.""" + +key3 = """\ + The quick brown \ + fox jumps over \ + the lazy dog.\ + """ + +[string.literal] + +# What you see is what you get. +winpath = 'C:\Users\nodejs\templates' +winpath2 = '\\ServerX\admin$\system32\' +quoted = 'Tom "Dubs" Preston-Werner' +regex = '<\i\c*\s*>' + + +[string.literal.multiline] + +regex2 = '''I [dw]on't need \d{2} apples''' +lines = ''' +The first newline is +trimmed in raw strings. + All other whitespace + is preserved. +''' + + +################################################################################ +## Integer + +# Integers are whole numbers. Positive numbers may be prefixed with a plus sign. +# Negative numbers are prefixed with a minus sign. + +[integer] + +key1 = +99 +key2 = 42 +key3 = 0 +key4 = -17 + +[integer.underscores] + +# For large numbers, you may use underscores to enhance readability. Each +# underscore must be surrounded by at least one digit. +key1 = 1_000 +key2 = 5_349_221 +key3 = 1_2_3_4_5 # valid but inadvisable + + +################################################################################ +## Float + +# A float consists of an integer part (which may be prefixed with a plus or +# minus sign) followed by a fractional part and/or an exponent part. + +[float.fractional] + +key1 = +1.0 +key2 = 3.1415 +key3 = -0.01 + +[float.exponent] + +[float.both] + +[float.underscores] + + +################################################################################ +## Boolean + +# Booleans are just the tokens you're used to. Always lowercase. + +[boolean] + +True = true +False = false + + +################################################################################ +## Datetime + +# Datetimes are RFC 3339 dates. + +[datetime] + +#key1 = 1979-05-27T07:32:00Z +#key2 = 1979-05-27T00:32:00-07:00 +#key3 = 1979-05-27T00:32:00.999999-07:00 + + +################################################################################ +## Array + +# Arrays are square brackets with other primitives inside. Whitespace is +# ignored. Elements are separated by commas. Since 2019-11-06 data types can be +# mixed. + +[array] + +key1 = [ 1, 2, 3 ] +key2 = [ "red", "yellow", "green" ] +key3 = [ [ 1, 2 ], [3, 4, 5] ] +key4 = [ [ 1, 2 ], ["a", "b", "c"] ] # this is ok + +# Arrays can also be multiline. So in addition to ignoring whitespace, arrays +# also ignore newlines between the brackets. Terminating commas are ok before +# the closing bracket. + +key5 = [ + 1, 2, 3 +] +key6 = [ + 1, + 2, # this is ok +] + + +################################################################################ +## Array of Tables + +# These can be expressed by using a table name in double brackets. Each table +# with the same double bracketed name will be an element in the array. The +# tables are inserted in the order encountered. + +[[products]] + +name = "Hammer" +sku = 738594937 + +[[products]] + +[[products]] + +name = "Nail" +sku = 284758393 +color = "gray" + + +# You can create nested arrays of tables as well. + +[[fruit]] + name = "apple" + + [fruit.physical] + color = "red" + shape = "round" + + [[fruit.variety]] + name = "red delicious" + + [[fruit.variety]] + name = "granny smith" + +[[fruit]] + name = "banana" + + [[fruit.variety]] + name = "plantain" diff --git a/test-suite/tests/valid/example-v0.4.0.toml b/test-suite/tests/valid/example-v0.4.0.toml deleted file mode 100644 index 69f1c1b..0000000 --- a/test-suite/tests/valid/example-v0.4.0.toml +++ /dev/null @@ -1,236 +0,0 @@ -################################################################################ -## Comment - -# Speak your mind with the hash symbol. They go from the symbol to the end of -# the line. - - -################################################################################ -## Table - -# Tables (also known as hash tables or dictionaries) are collections of -# key/value pairs. They appear in square brackets on a line by themselves. - -[table] - -key = "value" # Yeah, you can do this. - -# Nested tables are denoted by table names with dots in them. Name your tables -# whatever crap you please, just don't use #, ., [ or ]. - -[table.subtable] - -key = "another value" - -# You don't need to specify all the super-tables if you don't want to. TOML -# knows how to do it for you. - -# [x] you -# [x.y] don't -# [x.y.z] need these -[x.y.z.w] # for this to work - - -################################################################################ -## Inline Table - -# Inline tables provide a more compact syntax for expressing tables. They are -# especially useful for grouped data that can otherwise quickly become verbose. -# Inline tables are enclosed in curly braces `{` and `}`. No newlines are -# allowed between the curly braces unless they are valid within a value. - -[table.inline] - -name = { first = "Tom", last = "Preston-Werner" } -point = { x = 1, y = 2 } - - -################################################################################ -## String - -# There are four ways to express strings: basic, multi-line basic, literal, and -# multi-line literal. All strings must contain only valid UTF-8 characters. - -[string.basic] - -basic = "I'm a string. \"You can quote me\". Name\tJos\u00E9\nLocation\tSF." - -[string.multiline] - -# The following strings are byte-for-byte equivalent: -key1 = "One\nTwo" -key2 = """One\nTwo""" -key3 = """ -One -Two""" - -[string.multiline.continued] - -# The following strings are byte-for-byte equivalent: -key1 = "The quick brown fox jumps over the lazy dog." - -key2 = """ -The quick brown \ - - - fox jumps over \ - the lazy dog.""" - -key3 = """\ - The quick brown \ - fox jumps over \ - the lazy dog.\ - """ - -[string.literal] - -# What you see is what you get. -winpath = 'C:\Users\nodejs\templates' -winpath2 = '\\ServerX\admin$\system32\' -quoted = 'Tom "Dubs" Preston-Werner' -regex = '<\i\c*\s*>' - - -[string.literal.multiline] - -regex2 = '''I [dw]on't need \d{2} apples''' -lines = ''' -The first newline is -trimmed in raw strings. - All other whitespace - is preserved. -''' - - -################################################################################ -## Integer - -# Integers are whole numbers. Positive numbers may be prefixed with a plus sign. -# Negative numbers are prefixed with a minus sign. - -[integer] - -key1 = +99 -key2 = 42 -key3 = 0 -key4 = -17 - -[integer.underscores] - -# For large numbers, you may use underscores to enhance readability. Each -# underscore must be surrounded by at least one digit. -key1 = 1_000 -key2 = 5_349_221 -key3 = 1_2_3_4_5 # valid but inadvisable - - -################################################################################ -## Float - -# A float consists of an integer part (which may be prefixed with a plus or -# minus sign) followed by a fractional part and/or an exponent part. - -[float.fractional] - -key1 = +1.0 -key2 = 3.1415 -key3 = -0.01 - -[float.exponent] - -[float.both] - -[float.underscores] - - -################################################################################ -## Boolean - -# Booleans are just the tokens you're used to. Always lowercase. - -[boolean] - -True = true -False = false - - -################################################################################ -## Datetime - -# Datetimes are RFC 3339 dates. - -[datetime] - -#key1 = 1979-05-27T07:32:00Z -#key2 = 1979-05-27T00:32:00-07:00 -#key3 = 1979-05-27T00:32:00.999999-07:00 - - -################################################################################ -## Array - -# Arrays are square brackets with other primitives inside. Whitespace is -# ignored. Elements are separated by commas. Since 2019-11-06 data types can be -# mixed. - -[array] - -key1 = [ 1, 2, 3 ] -key2 = [ "red", "yellow", "green" ] -key3 = [ [ 1, 2 ], [3, 4, 5] ] -key4 = [ [ 1, 2 ], ["a", "b", "c"] ] # this is ok - -# Arrays can also be multiline. So in addition to ignoring whitespace, arrays -# also ignore newlines between the brackets. Terminating commas are ok before -# the closing bracket. - -key5 = [ - 1, 2, 3 -] -key6 = [ - 1, - 2, # this is ok -] - - -################################################################################ -## Array of Tables - -# These can be expressed by using a table name in double brackets. Each table -# with the same double bracketed name will be an element in the array. The -# tables are inserted in the order encountered. - -[[products]] - -name = "Hammer" -sku = 738594937 - -[[products]] - -[[products]] - -name = "Nail" -sku = 284758393 -color = "gray" - - -# You can create nested arrays of tables as well. - -[[fruit]] - name = "apple" - - [fruit.physical] - color = "red" - shape = "round" - - [[fruit.variety]] - name = "red delicious" - - [[fruit.variety]] - name = "granny smith" - -[[fruit]] - name = "banana" - - [[fruit.variety]] - name = "plantain" diff --git a/test-suite/tests/valid/example.milf b/test-suite/tests/valid/example.milf new file mode 100644 index 0000000..8cb02e0 --- /dev/null +++ b/test-suite/tests/valid/example.milf @@ -0,0 +1,5 @@ +best-day-ever = 1987-07-05T17:45:00Z + +[numtheory] +boring = false +perfection = [6, 28, 496] diff --git a/test-suite/tests/valid/example.toml b/test-suite/tests/valid/example.toml deleted file mode 100644 index 8cb02e0..0000000 --- a/test-suite/tests/valid/example.toml +++ /dev/null @@ -1,5 +0,0 @@ -best-day-ever = 1987-07-05T17:45:00Z - -[numtheory] -boring = false -perfection = [6, 28, 496] diff --git a/test-suite/tests/valid/example2.json b/test-suite/tests/valid/example2.json index 3249a97..5471d7f 100644 --- a/test-suite/tests/valid/example2.json +++ b/test-suite/tests/valid/example2.json @@ -1 +1 @@ -{"clients":{"data":{"type":"array","value":[{"type":"array","value":[{"type":"string","value":"gamma"},{"type":"string","value":"delta"}]},{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"}]}]},"hosts":{"type":"array","value":[{"type":"string","value":"alpha"},{"type":"string","value":"omega"}]}},"database":{"connection_max":{"type":"integer","value":"5000"},"enabled":{"type":"bool","value":"true"},"ports":{"type":"array","value":[{"type":"integer","value":"8001"},{"type":"integer","value":"8001"},{"type":"integer","value":"8002"}]},"server":{"type":"string","value":"192.168.1.1"}},"owner":{"bio":{"type":"string","value":"GitHub Cofounder \u0026 CEO\nLikes tater tots and beer."},"dob":{"type":"datetime","value":"1979-05-27T07:32:00Z"},"name":{"type":"string","value":"Tom Preston-Werner"},"organization":{"type":"string","value":"GitHub"}},"products":[{"name":{"type":"string","value":"Hammer"},"sku":{"type":"integer","value":"738594937"}},{"color":{"type":"string","value":"gray"},"name":{"type":"string","value":"Nail"},"sku":{"type":"integer","value":"284758393"}}],"servers":{"alpha":{"dc":{"type":"string","value":"eqdc10"},"ip":{"type":"string","value":"10.0.0.1"}},"beta":{"country":{"type":"string","value":"中国"},"dc":{"type":"string","value":"eqdc10"},"ip":{"type":"string","value":"10.0.0.2"}}},"title":{"type":"string","value":"TOML Example"}} +{"clients":{"data":{"type":"array","value":[{"type":"array","value":[{"type":"string","value":"gamma"},{"type":"string","value":"delta"}]},{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"}]}]},"hosts":{"type":"array","value":[{"type":"string","value":"alpha"},{"type":"string","value":"omega"}]}},"database":{"connection_max":{"type":"integer","value":"5000"},"enabled":{"type":"bool","value":"true"},"ports":{"type":"array","value":[{"type":"integer","value":"8001"},{"type":"integer","value":"8001"},{"type":"integer","value":"8002"}]},"server":{"type":"string","value":"192.168.1.1"}},"owner":{"bio":{"type":"string","value":"GitHub Cofounder \u0026 CEO\nLikes tater tots and beer."},"dob":{"type":"datetime","value":"1979-05-27T07:32:00Z"},"name":{"type":"string","value":"Tom Preston-Werner"},"organization":{"type":"string","value":"GitHub"}},"products":[{"name":{"type":"string","value":"Hammer"},"sku":{"type":"integer","value":"738594937"}},{"color":{"type":"string","value":"gray"},"name":{"type":"string","value":"Nail"},"sku":{"type":"integer","value":"284758393"}}],"servers":{"alpha":{"dc":{"type":"string","value":"eqdc10"},"ip":{"type":"string","value":"10.0.0.1"}},"beta":{"country":{"type":"string","value":"中国"},"dc":{"type":"string","value":"eqdc10"},"ip":{"type":"string","value":"10.0.0.2"}}},"title":{"type":"string","value":"MILF Example"}} diff --git a/test-suite/tests/valid/example2.milf b/test-suite/tests/valid/example2.milf new file mode 100644 index 0000000..75b138c --- /dev/null +++ b/test-suite/tests/valid/example2.milf @@ -0,0 +1,47 @@ +# This is a MILF document. Boom. + +title = "MILF Example" + +[owner] +name = "Tom Preston-Werner" +organization = "GitHub" +bio = "GitHub Cofounder & CEO\nLikes tater tots and beer." +dob = 1979-05-27T07:32:00Z # First class dates? Why not? + +[database] +server = "192.168.1.1" +ports = [ 8001, 8001, 8002 ] +connection_max = 5000 +enabled = true + +[servers] + + # You can indent as you please. Tabs or spaces. MILF don't care. + [servers.alpha] + ip = "10.0.0.1" + dc = "eqdc10" + + [servers.beta] + ip = "10.0.0.2" + dc = "eqdc10" + country = "中国" # This should be parsed as UTF-8 + +[clients] +data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it + +# Line breaks are OK when inside arrays +hosts = [ + "alpha", + "omega" +] + +# Products + + [[products]] + name = "Hammer" + sku = 738594937 + + [[products]] + name = "Nail" + sku = 284758393 + color = "gray" diff --git a/test-suite/tests/valid/example2.toml b/test-suite/tests/valid/example2.toml deleted file mode 100644 index bc12c99..0000000 --- a/test-suite/tests/valid/example2.toml +++ /dev/null @@ -1,47 +0,0 @@ -# This is a TOML document. Boom. - -title = "TOML Example" - -[owner] -name = "Tom Preston-Werner" -organization = "GitHub" -bio = "GitHub Cofounder & CEO\nLikes tater tots and beer." -dob = 1979-05-27T07:32:00Z # First class dates? Why not? - -[database] -server = "192.168.1.1" -ports = [ 8001, 8001, 8002 ] -connection_max = 5000 -enabled = true - -[servers] - - # You can indent as you please. Tabs or spaces. TOML don't care. - [servers.alpha] - ip = "10.0.0.1" - dc = "eqdc10" - - [servers.beta] - ip = "10.0.0.2" - dc = "eqdc10" - country = "中国" # This should be parsed as UTF-8 - -[clients] -data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it - -# Line breaks are OK when inside arrays -hosts = [ - "alpha", - "omega" -] - -# Products - - [[products]] - name = "Hammer" - sku = 738594937 - - [[products]] - name = "Nail" - sku = 284758393 - color = "gray" diff --git a/test-suite/tests/valid/float-exponent.milf b/test-suite/tests/valid/float-exponent.milf new file mode 100644 index 0000000..5349db3 --- /dev/null +++ b/test-suite/tests/valid/float-exponent.milf @@ -0,0 +1,9 @@ +lower = 3e2 +upper = 3E2 +neg = 3e-2 +pos = 3E+2 +zero = 3e0 +pointlower = 3.1e2 +pointupper = 3.1E2 +prefix-zero-exp = 1e06 +prefix-zero-exp-plus = 1e+06 diff --git a/test-suite/tests/valid/float-exponent.toml b/test-suite/tests/valid/float-exponent.toml deleted file mode 100644 index 5349db3..0000000 --- a/test-suite/tests/valid/float-exponent.toml +++ /dev/null @@ -1,9 +0,0 @@ -lower = 3e2 -upper = 3E2 -neg = 3e-2 -pos = 3E+2 -zero = 3e0 -pointlower = 3.1e2 -pointupper = 3.1E2 -prefix-zero-exp = 1e06 -prefix-zero-exp-plus = 1e+06 diff --git a/test-suite/tests/valid/float.milf b/test-suite/tests/valid/float.milf new file mode 100644 index 0000000..7c528d2 --- /dev/null +++ b/test-suite/tests/valid/float.milf @@ -0,0 +1,2 @@ +pi = 3.14 +negpi = -3.14 diff --git a/test-suite/tests/valid/float.toml b/test-suite/tests/valid/float.toml deleted file mode 100644 index 7c528d2..0000000 --- a/test-suite/tests/valid/float.toml +++ /dev/null @@ -1,2 +0,0 @@ -pi = 3.14 -negpi = -3.14 diff --git a/test-suite/tests/valid/hard_example.milf b/test-suite/tests/valid/hard_example.milf new file mode 100644 index 0000000..d2181ec --- /dev/null +++ b/test-suite/tests/valid/hard_example.milf @@ -0,0 +1,33 @@ +# Test file for MILF +# Only this one tries to emulate a MILF file written by a user of the kind of parser writers probably hate +# This part you'll really hate + +[the] +test_string = "You'll hate me after this - #" # " Annoying, isn't it? + + [the.hard] + test_array = [ "] ", " # "] # ] There you go, parse this! + test_array2 = [ "Test #11 ]proved that", "Experiment #9 was a success" ] + # You didn't think it'd as easy as chucking out the last #, did you? + another_test_string = " Same thing, but with a string #" + harder_test_string = " And when \"'s are in the string, along with # \"" # "and comments are there too" + # Things will get harder + + [the.hard."bit#"] + "what?" = "You don't think some user won't do that?" + multi_line_array = [ + "]", + # ] Oh yes I did + ] + +# Each of the following keygroups/key value pairs should produce an error. Uncomment to them to test + +#[error] if you didn't catch this, your parser is broken +#string = "Anything other than tabs, spaces and newline after a keygroup or key value pair has ended should produce an error unless it is a comment" like this +#array = [ +# "This might most likely happen in multiline arrays", +# Like here, +# "or here, +# and here" +# ] End of array comment, forgot the # +#number = 3.14 pi <--again forgot the # diff --git a/test-suite/tests/valid/hard_example.toml b/test-suite/tests/valid/hard_example.toml deleted file mode 100644 index 38856c8..0000000 --- a/test-suite/tests/valid/hard_example.toml +++ /dev/null @@ -1,33 +0,0 @@ -# Test file for TOML -# Only this one tries to emulate a TOML file written by a user of the kind of parser writers probably hate -# This part you'll really hate - -[the] -test_string = "You'll hate me after this - #" # " Annoying, isn't it? - - [the.hard] - test_array = [ "] ", " # "] # ] There you go, parse this! - test_array2 = [ "Test #11 ]proved that", "Experiment #9 was a success" ] - # You didn't think it'd as easy as chucking out the last #, did you? - another_test_string = " Same thing, but with a string #" - harder_test_string = " And when \"'s are in the string, along with # \"" # "and comments are there too" - # Things will get harder - - [the.hard."bit#"] - "what?" = "You don't think some user won't do that?" - multi_line_array = [ - "]", - # ] Oh yes I did - ] - -# Each of the following keygroups/key value pairs should produce an error. Uncomment to them to test - -#[error] if you didn't catch this, your parser is broken -#string = "Anything other than tabs, spaces and newline after a keygroup or key value pair has ended should produce an error unless it is a comment" like this -#array = [ -# "This might most likely happen in multiline arrays", -# Like here, -# "or here, -# and here" -# ] End of array comment, forgot the # -#number = 3.14 pi <--again forgot the # diff --git a/test-suite/tests/valid/implicit-and-explicit-after.milf b/test-suite/tests/valid/implicit-and-explicit-after.milf new file mode 100644 index 0000000..c0e8865 --- /dev/null +++ b/test-suite/tests/valid/implicit-and-explicit-after.milf @@ -0,0 +1,5 @@ +[a.b.c] +answer = 42 + +[a] +better = 43 diff --git a/test-suite/tests/valid/implicit-and-explicit-after.toml b/test-suite/tests/valid/implicit-and-explicit-after.toml deleted file mode 100644 index c0e8865..0000000 --- a/test-suite/tests/valid/implicit-and-explicit-after.toml +++ /dev/null @@ -1,5 +0,0 @@ -[a.b.c] -answer = 42 - -[a] -better = 43 diff --git a/test-suite/tests/valid/implicit-and-explicit-before.milf b/test-suite/tests/valid/implicit-and-explicit-before.milf new file mode 100644 index 0000000..eee68ff --- /dev/null +++ b/test-suite/tests/valid/implicit-and-explicit-before.milf @@ -0,0 +1,5 @@ +[a] +better = 43 + +[a.b.c] +answer = 42 diff --git a/test-suite/tests/valid/implicit-and-explicit-before.toml b/test-suite/tests/valid/implicit-and-explicit-before.toml deleted file mode 100644 index eee68ff..0000000 --- a/test-suite/tests/valid/implicit-and-explicit-before.toml +++ /dev/null @@ -1,5 +0,0 @@ -[a] -better = 43 - -[a.b.c] -answer = 42 diff --git a/test-suite/tests/valid/implicit-groups.milf b/test-suite/tests/valid/implicit-groups.milf new file mode 100644 index 0000000..b6333e4 --- /dev/null +++ b/test-suite/tests/valid/implicit-groups.milf @@ -0,0 +1,2 @@ +[a.b.c] +answer = 42 diff --git a/test-suite/tests/valid/implicit-groups.toml b/test-suite/tests/valid/implicit-groups.toml deleted file mode 100644 index b6333e4..0000000 --- a/test-suite/tests/valid/implicit-groups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[a.b.c] -answer = 42 diff --git a/test-suite/tests/valid/integer.milf b/test-suite/tests/valid/integer.milf new file mode 100644 index 0000000..8362459 --- /dev/null +++ b/test-suite/tests/valid/integer.milf @@ -0,0 +1,18 @@ +answer = 42 +neganswer = -42 + +neg_zero = -0 +pos_zero = +0 + +# hexadecimal with prefix `0x` +hex1 = 0xDEADBEEF +hex2 = 0xdeadbeef +hex3 = 0xdead_beef + +# octal with prefix `0o` +oct1 = 0o01234567 +oct2 = 0o755 # useful for Unix file permissions + +# binary with prefix `0b` +bin1 = 0b11010110 + diff --git a/test-suite/tests/valid/integer.toml b/test-suite/tests/valid/integer.toml deleted file mode 100644 index 8362459..0000000 --- a/test-suite/tests/valid/integer.toml +++ /dev/null @@ -1,18 +0,0 @@ -answer = 42 -neganswer = -42 - -neg_zero = -0 -pos_zero = +0 - -# hexadecimal with prefix `0x` -hex1 = 0xDEADBEEF -hex2 = 0xdeadbeef -hex3 = 0xdead_beef - -# octal with prefix `0o` -oct1 = 0o01234567 -oct2 = 0o755 # useful for Unix file permissions - -# binary with prefix `0b` -bin1 = 0b11010110 - diff --git a/test-suite/tests/valid/key-equals-nospace.milf b/test-suite/tests/valid/key-equals-nospace.milf new file mode 100644 index 0000000..560901c --- /dev/null +++ b/test-suite/tests/valid/key-equals-nospace.milf @@ -0,0 +1 @@ +answer=42 diff --git a/test-suite/tests/valid/key-equals-nospace.toml b/test-suite/tests/valid/key-equals-nospace.toml deleted file mode 100644 index 560901c..0000000 --- a/test-suite/tests/valid/key-equals-nospace.toml +++ /dev/null @@ -1 +0,0 @@ -answer=42 diff --git a/test-suite/tests/valid/key-quote-newline.milf b/test-suite/tests/valid/key-quote-newline.milf new file mode 100644 index 0000000..a2639bf --- /dev/null +++ b/test-suite/tests/valid/key-quote-newline.milf @@ -0,0 +1 @@ +"\n" = 1 diff --git a/test-suite/tests/valid/key-quote-newline.toml b/test-suite/tests/valid/key-quote-newline.toml deleted file mode 100644 index a2639bf..0000000 --- a/test-suite/tests/valid/key-quote-newline.toml +++ /dev/null @@ -1 +0,0 @@ -"\n" = 1 diff --git a/test-suite/tests/valid/key-space.milf b/test-suite/tests/valid/key-space.milf new file mode 100644 index 0000000..f4f36c4 --- /dev/null +++ b/test-suite/tests/valid/key-space.milf @@ -0,0 +1 @@ +"a b" = 1 diff --git a/test-suite/tests/valid/key-space.toml b/test-suite/tests/valid/key-space.toml deleted file mode 100644 index f4f36c4..0000000 --- a/test-suite/tests/valid/key-space.toml +++ /dev/null @@ -1 +0,0 @@ -"a b" = 1 diff --git a/test-suite/tests/valid/key-special-chars.milf b/test-suite/tests/valid/key-special-chars.milf new file mode 100644 index 0000000..dc43625 --- /dev/null +++ b/test-suite/tests/valid/key-special-chars.milf @@ -0,0 +1 @@ +"~!@#$^&*()_+-`1234567890[]\\|/?><.,;:'" = 1 diff --git a/test-suite/tests/valid/key-special-chars.toml b/test-suite/tests/valid/key-special-chars.toml deleted file mode 100644 index dc43625..0000000 --- a/test-suite/tests/valid/key-special-chars.toml +++ /dev/null @@ -1 +0,0 @@ -"~!@#$^&*()_+-`1234567890[]\\|/?><.,;:'" = 1 diff --git a/test-suite/tests/valid/key-with-pound.milf b/test-suite/tests/valid/key-with-pound.milf new file mode 100644 index 0000000..65b766f --- /dev/null +++ b/test-suite/tests/valid/key-with-pound.milf @@ -0,0 +1 @@ +"key#name" = 5 diff --git a/test-suite/tests/valid/key-with-pound.toml b/test-suite/tests/valid/key-with-pound.toml deleted file mode 100644 index 65b766f..0000000 --- a/test-suite/tests/valid/key-with-pound.toml +++ /dev/null @@ -1 +0,0 @@ -"key#name" = 5 diff --git a/test-suite/tests/valid/long-float.milf b/test-suite/tests/valid/long-float.milf new file mode 100644 index 0000000..9558ae4 --- /dev/null +++ b/test-suite/tests/valid/long-float.milf @@ -0,0 +1,2 @@ +longpi = 3.141592653589793 +neglongpi = -3.141592653589793 diff --git a/test-suite/tests/valid/long-float.toml b/test-suite/tests/valid/long-float.toml deleted file mode 100644 index 9558ae4..0000000 --- a/test-suite/tests/valid/long-float.toml +++ /dev/null @@ -1,2 +0,0 @@ -longpi = 3.141592653589793 -neglongpi = -3.141592653589793 diff --git a/test-suite/tests/valid/long-integer.milf b/test-suite/tests/valid/long-integer.milf new file mode 100644 index 0000000..424a13a --- /dev/null +++ b/test-suite/tests/valid/long-integer.milf @@ -0,0 +1,2 @@ +answer = 9223372036854775807 +neganswer = -9223372036854775808 diff --git a/test-suite/tests/valid/long-integer.toml b/test-suite/tests/valid/long-integer.toml deleted file mode 100644 index 424a13a..0000000 --- a/test-suite/tests/valid/long-integer.toml +++ /dev/null @@ -1,2 +0,0 @@ -answer = 9223372036854775807 -neganswer = -9223372036854775808 diff --git a/test-suite/tests/valid/multiline-string.milf b/test-suite/tests/valid/multiline-string.milf new file mode 100644 index 0000000..2c4237f --- /dev/null +++ b/test-suite/tests/valid/multiline-string.milf @@ -0,0 +1,34 @@ +multiline_empty_one = """""" +multiline_empty_two = """ +""" +multiline_empty_three = """\ + """ +multiline_empty_four = """\ + \ + \ + """ +multiline_empty_five = """\ + \ + \ + \ + """ + +equivalent_one = "The quick brown fox jumps over the lazy dog." +equivalent_two = """ +The quick brown \ + + + fox jumps over \ + the lazy dog.""" + +equivalent_three = """\ + The quick brown \ + fox jumps over \ + the lazy dog.\ + """ + +equivalent_four = """\ + The quick brown \ + fox jumps over \ + the lazy dog.\ + """ diff --git a/test-suite/tests/valid/multiline-string.toml b/test-suite/tests/valid/multiline-string.toml deleted file mode 100644 index 2c4237f..0000000 --- a/test-suite/tests/valid/multiline-string.toml +++ /dev/null @@ -1,34 +0,0 @@ -multiline_empty_one = """""" -multiline_empty_two = """ -""" -multiline_empty_three = """\ - """ -multiline_empty_four = """\ - \ - \ - """ -multiline_empty_five = """\ - \ - \ - \ - """ - -equivalent_one = "The quick brown fox jumps over the lazy dog." -equivalent_two = """ -The quick brown \ - - - fox jumps over \ - the lazy dog.""" - -equivalent_three = """\ - The quick brown \ - fox jumps over \ - the lazy dog.\ - """ - -equivalent_four = """\ - The quick brown \ - fox jumps over \ - the lazy dog.\ - """ diff --git a/test-suite/tests/valid/quote-surrounded-value.milf b/test-suite/tests/valid/quote-surrounded-value.milf new file mode 100644 index 0000000..dc8697e --- /dev/null +++ b/test-suite/tests/valid/quote-surrounded-value.milf @@ -0,0 +1,2 @@ +double = '"double quotes here"' +single = "'single quotes here'" diff --git a/test-suite/tests/valid/quote-surrounded-value.toml b/test-suite/tests/valid/quote-surrounded-value.toml deleted file mode 100644 index dc8697e..0000000 --- a/test-suite/tests/valid/quote-surrounded-value.toml +++ /dev/null @@ -1,2 +0,0 @@ -double = '"double quotes here"' -single = "'single quotes here'" diff --git a/test-suite/tests/valid/raw-multiline-string.milf b/test-suite/tests/valid/raw-multiline-string.milf new file mode 100644 index 0000000..8094c03 --- /dev/null +++ b/test-suite/tests/valid/raw-multiline-string.milf @@ -0,0 +1,9 @@ +oneline = '''This string has a ' quote character.''' +firstnl = ''' +This string has a ' quote character.''' +multiline = ''' +This string +has ' a quote character +and more than +one newline +in it.''' diff --git a/test-suite/tests/valid/raw-multiline-string.toml b/test-suite/tests/valid/raw-multiline-string.toml deleted file mode 100644 index 8094c03..0000000 --- a/test-suite/tests/valid/raw-multiline-string.toml +++ /dev/null @@ -1,9 +0,0 @@ -oneline = '''This string has a ' quote character.''' -firstnl = ''' -This string has a ' quote character.''' -multiline = ''' -This string -has ' a quote character -and more than -one newline -in it.''' diff --git a/test-suite/tests/valid/raw-string.milf b/test-suite/tests/valid/raw-string.milf new file mode 100644 index 0000000..92acd25 --- /dev/null +++ b/test-suite/tests/valid/raw-string.milf @@ -0,0 +1,7 @@ +backspace = 'This string has a \b backspace character.' +tab = 'This string has a \t tab character.' +newline = 'This string has a \n new line character.' +formfeed = 'This string has a \f form feed character.' +carriage = 'This string has a \r carriage return character.' +slash = 'This string has a \/ slash character.' +backslash = 'This string has a \\ backslash character.' diff --git a/test-suite/tests/valid/raw-string.toml b/test-suite/tests/valid/raw-string.toml deleted file mode 100644 index 92acd25..0000000 --- a/test-suite/tests/valid/raw-string.toml +++ /dev/null @@ -1,7 +0,0 @@ -backspace = 'This string has a \b backspace character.' -tab = 'This string has a \t tab character.' -newline = 'This string has a \n new line character.' -formfeed = 'This string has a \f form feed character.' -carriage = 'This string has a \r carriage return character.' -slash = 'This string has a \/ slash character.' -backslash = 'This string has a \\ backslash character.' diff --git a/test-suite/tests/valid/string-delim-end.milf b/test-suite/tests/valid/string-delim-end.milf new file mode 100644 index 0000000..9a41219 --- /dev/null +++ b/test-suite/tests/valid/string-delim-end.milf @@ -0,0 +1,3 @@ +str1 = """"This," she said, "is just a pointless statement."""" +str2 = '''foo''bar''''' +str3 = """""""" diff --git a/test-suite/tests/valid/string-delim-end.toml b/test-suite/tests/valid/string-delim-end.toml deleted file mode 100644 index 9a41219..0000000 --- a/test-suite/tests/valid/string-delim-end.toml +++ /dev/null @@ -1,3 +0,0 @@ -str1 = """"This," she said, "is just a pointless statement."""" -str2 = '''foo''bar''''' -str3 = """""""" diff --git a/test-suite/tests/valid/string-empty.milf b/test-suite/tests/valid/string-empty.milf new file mode 100644 index 0000000..e37e681 --- /dev/null +++ b/test-suite/tests/valid/string-empty.milf @@ -0,0 +1 @@ +answer = "" diff --git a/test-suite/tests/valid/string-empty.toml b/test-suite/tests/valid/string-empty.toml deleted file mode 100644 index e37e681..0000000 --- a/test-suite/tests/valid/string-empty.toml +++ /dev/null @@ -1 +0,0 @@ -answer = "" diff --git a/test-suite/tests/valid/string-escapes.milf b/test-suite/tests/valid/string-escapes.milf new file mode 100644 index 0000000..152c6ad --- /dev/null +++ b/test-suite/tests/valid/string-escapes.milf @@ -0,0 +1,14 @@ +backspace = "This string has a \b backspace character." +tab = "This string has a \t tab character." +newline = "This string has a \n new line character." +formfeed = "This string has a \f form feed character." +carriage = "This string has a \r carriage return character." +quote = "This string has a \" quote character." +slash = "This string has a / slash character." +backslash = "This string has a \\ backslash character." +notunicode1 = "This string does not have a unicode \\u escape." +notunicode2 = "This string does not have a unicode \u005Cu escape." +notunicode3 = "This string does not have a unicode \\u0075 escape." +notunicode4 = "This string does not have a unicode \\\u0075 escape." +delete = "This string has a \u007F delete control code." +unitseparator = "This string has a \u001F unit separator control code." diff --git a/test-suite/tests/valid/string-escapes.toml b/test-suite/tests/valid/string-escapes.toml deleted file mode 100644 index 152c6ad..0000000 --- a/test-suite/tests/valid/string-escapes.toml +++ /dev/null @@ -1,14 +0,0 @@ -backspace = "This string has a \b backspace character." -tab = "This string has a \t tab character." -newline = "This string has a \n new line character." -formfeed = "This string has a \f form feed character." -carriage = "This string has a \r carriage return character." -quote = "This string has a \" quote character." -slash = "This string has a / slash character." -backslash = "This string has a \\ backslash character." -notunicode1 = "This string does not have a unicode \\u escape." -notunicode2 = "This string does not have a unicode \u005Cu escape." -notunicode3 = "This string does not have a unicode \\u0075 escape." -notunicode4 = "This string does not have a unicode \\\u0075 escape." -delete = "This string has a \u007F delete control code." -unitseparator = "This string has a \u001F unit separator control code." diff --git a/test-suite/tests/valid/string-simple.milf b/test-suite/tests/valid/string-simple.milf new file mode 100644 index 0000000..e17ade6 --- /dev/null +++ b/test-suite/tests/valid/string-simple.milf @@ -0,0 +1 @@ +answer = "You are not drinking enough whisky." diff --git a/test-suite/tests/valid/string-simple.toml b/test-suite/tests/valid/string-simple.toml deleted file mode 100644 index e17ade6..0000000 --- a/test-suite/tests/valid/string-simple.toml +++ /dev/null @@ -1 +0,0 @@ -answer = "You are not drinking enough whisky." diff --git a/test-suite/tests/valid/string-with-pound.milf b/test-suite/tests/valid/string-with-pound.milf new file mode 100644 index 0000000..5fd8746 --- /dev/null +++ b/test-suite/tests/valid/string-with-pound.milf @@ -0,0 +1,2 @@ +pound = "We see no # comments here." +poundcomment = "But there are # some comments here." # Did I # mess you up? diff --git a/test-suite/tests/valid/string-with-pound.toml b/test-suite/tests/valid/string-with-pound.toml deleted file mode 100644 index 5fd8746..0000000 --- a/test-suite/tests/valid/string-with-pound.toml +++ /dev/null @@ -1,2 +0,0 @@ -pound = "We see no # comments here." -poundcomment = "But there are # some comments here." # Did I # mess you up? diff --git a/test-suite/tests/valid/table-array-implicit.milf b/test-suite/tests/valid/table-array-implicit.milf new file mode 100644 index 0000000..3157ac9 --- /dev/null +++ b/test-suite/tests/valid/table-array-implicit.milf @@ -0,0 +1,2 @@ +[[albums.songs]] +name = "Glory Days" diff --git a/test-suite/tests/valid/table-array-implicit.toml b/test-suite/tests/valid/table-array-implicit.toml deleted file mode 100644 index 3157ac9..0000000 --- a/test-suite/tests/valid/table-array-implicit.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[albums.songs]] -name = "Glory Days" diff --git a/test-suite/tests/valid/table-array-many.milf b/test-suite/tests/valid/table-array-many.milf new file mode 100644 index 0000000..46062be --- /dev/null +++ b/test-suite/tests/valid/table-array-many.milf @@ -0,0 +1,11 @@ +[[people]] +first_name = "Bruce" +last_name = "Springsteen" + +[[people]] +first_name = "Eric" +last_name = "Clapton" + +[[people]] +first_name = "Bob" +last_name = "Seger" diff --git a/test-suite/tests/valid/table-array-many.toml b/test-suite/tests/valid/table-array-many.toml deleted file mode 100644 index 46062be..0000000 --- a/test-suite/tests/valid/table-array-many.toml +++ /dev/null @@ -1,11 +0,0 @@ -[[people]] -first_name = "Bruce" -last_name = "Springsteen" - -[[people]] -first_name = "Eric" -last_name = "Clapton" - -[[people]] -first_name = "Bob" -last_name = "Seger" diff --git a/test-suite/tests/valid/table-array-nest-no-keys.milf b/test-suite/tests/valid/table-array-nest-no-keys.milf new file mode 100644 index 0000000..ad6eb10 --- /dev/null +++ b/test-suite/tests/valid/table-array-nest-no-keys.milf @@ -0,0 +1,6 @@ +[[ albums ]] + [[ albums.songs ]] + [[ albums.songs ]] + +[[ artists ]] + [ artists.home.address ] diff --git a/test-suite/tests/valid/table-array-nest-no-keys.toml b/test-suite/tests/valid/table-array-nest-no-keys.toml deleted file mode 100644 index ad6eb10..0000000 --- a/test-suite/tests/valid/table-array-nest-no-keys.toml +++ /dev/null @@ -1,6 +0,0 @@ -[[ albums ]] - [[ albums.songs ]] - [[ albums.songs ]] - -[[ artists ]] - [ artists.home.address ] diff --git a/test-suite/tests/valid/table-array-nest.milf b/test-suite/tests/valid/table-array-nest.milf new file mode 100644 index 0000000..d659a3d --- /dev/null +++ b/test-suite/tests/valid/table-array-nest.milf @@ -0,0 +1,17 @@ +[[albums]] +name = "Born to Run" + + [[albums.songs]] + name = "Jungleland" + + [[albums.songs]] + name = "Meeting Across the River" + +[[albums]] +name = "Born in the USA" + + [[albums.songs]] + name = "Glory Days" + + [[albums.songs]] + name = "Dancing in the Dark" diff --git a/test-suite/tests/valid/table-array-nest.toml b/test-suite/tests/valid/table-array-nest.toml deleted file mode 100644 index d659a3d..0000000 --- a/test-suite/tests/valid/table-array-nest.toml +++ /dev/null @@ -1,17 +0,0 @@ -[[albums]] -name = "Born to Run" - - [[albums.songs]] - name = "Jungleland" - - [[albums.songs]] - name = "Meeting Across the River" - -[[albums]] -name = "Born in the USA" - - [[albums.songs]] - name = "Glory Days" - - [[albums.songs]] - name = "Dancing in the Dark" diff --git a/test-suite/tests/valid/table-array-one.milf b/test-suite/tests/valid/table-array-one.milf new file mode 100644 index 0000000..cd7e1b6 --- /dev/null +++ b/test-suite/tests/valid/table-array-one.milf @@ -0,0 +1,3 @@ +[[people]] +first_name = "Bruce" +last_name = "Springsteen" diff --git a/test-suite/tests/valid/table-array-one.toml b/test-suite/tests/valid/table-array-one.toml deleted file mode 100644 index cd7e1b6..0000000 --- a/test-suite/tests/valid/table-array-one.toml +++ /dev/null @@ -1,3 +0,0 @@ -[[people]] -first_name = "Bruce" -last_name = "Springsteen" diff --git a/test-suite/tests/valid/table-empty.milf b/test-suite/tests/valid/table-empty.milf new file mode 100644 index 0000000..8bb6a0a --- /dev/null +++ b/test-suite/tests/valid/table-empty.milf @@ -0,0 +1 @@ +[a] diff --git a/test-suite/tests/valid/table-empty.toml b/test-suite/tests/valid/table-empty.toml deleted file mode 100644 index 8bb6a0a..0000000 --- a/test-suite/tests/valid/table-empty.toml +++ /dev/null @@ -1 +0,0 @@ -[a] diff --git a/test-suite/tests/valid/table-multi-empty.milf b/test-suite/tests/valid/table-multi-empty.milf new file mode 100644 index 0000000..2266ed2 --- /dev/null +++ b/test-suite/tests/valid/table-multi-empty.milf @@ -0,0 +1,5 @@ +[a] +[a.b] +[b] +[c] +[c.a] diff --git a/test-suite/tests/valid/table-multi-empty.toml b/test-suite/tests/valid/table-multi-empty.toml deleted file mode 100644 index 2266ed2..0000000 --- a/test-suite/tests/valid/table-multi-empty.toml +++ /dev/null @@ -1,5 +0,0 @@ -[a] -[a.b] -[b] -[c] -[c.a] diff --git a/test-suite/tests/valid/table-sub-empty.milf b/test-suite/tests/valid/table-sub-empty.milf new file mode 100644 index 0000000..70b7fe1 --- /dev/null +++ b/test-suite/tests/valid/table-sub-empty.milf @@ -0,0 +1,2 @@ +[a] +[a.b] diff --git a/test-suite/tests/valid/table-sub-empty.toml b/test-suite/tests/valid/table-sub-empty.toml deleted file mode 100644 index 70b7fe1..0000000 --- a/test-suite/tests/valid/table-sub-empty.toml +++ /dev/null @@ -1,2 +0,0 @@ -[a] -[a.b] diff --git a/test-suite/tests/valid/table-whitespace.milf b/test-suite/tests/valid/table-whitespace.milf new file mode 100644 index 0000000..daf881d --- /dev/null +++ b/test-suite/tests/valid/table-whitespace.milf @@ -0,0 +1 @@ +["valid key"] diff --git a/test-suite/tests/valid/table-whitespace.toml b/test-suite/tests/valid/table-whitespace.toml deleted file mode 100644 index daf881d..0000000 --- a/test-suite/tests/valid/table-whitespace.toml +++ /dev/null @@ -1 +0,0 @@ -["valid key"] diff --git a/test-suite/tests/valid/table-with-pound.milf b/test-suite/tests/valid/table-with-pound.milf new file mode 100644 index 0000000..33f2c4f --- /dev/null +++ b/test-suite/tests/valid/table-with-pound.milf @@ -0,0 +1,2 @@ +["key#group"] +answer = 42 diff --git a/test-suite/tests/valid/table-with-pound.toml b/test-suite/tests/valid/table-with-pound.toml deleted file mode 100644 index 33f2c4f..0000000 --- a/test-suite/tests/valid/table-with-pound.toml +++ /dev/null @@ -1,2 +0,0 @@ -["key#group"] -answer = 42 diff --git a/test-suite/tests/valid/unicode-escape.milf b/test-suite/tests/valid/unicode-escape.milf new file mode 100644 index 0000000..6654252 --- /dev/null +++ b/test-suite/tests/valid/unicode-escape.milf @@ -0,0 +1,6 @@ +answer1 = "\u000B" +answer4 = "\u03B4α" +answer8 = "\U000003B4β" +answer9 = "\uc0de" +answer10 = "\u03b4α" +answer11 = "\U0000abc1" diff --git a/test-suite/tests/valid/unicode-escape.toml b/test-suite/tests/valid/unicode-escape.toml deleted file mode 100644 index 6654252..0000000 --- a/test-suite/tests/valid/unicode-escape.toml +++ /dev/null @@ -1,6 +0,0 @@ -answer1 = "\u000B" -answer4 = "\u03B4α" -answer8 = "\U000003B4β" -answer9 = "\uc0de" -answer10 = "\u03b4α" -answer11 = "\U0000abc1" diff --git a/test-suite/tests/valid/unicode-literal.milf b/test-suite/tests/valid/unicode-literal.milf new file mode 100644 index 0000000..c65723c --- /dev/null +++ b/test-suite/tests/valid/unicode-literal.milf @@ -0,0 +1 @@ +answer = "δ" diff --git a/test-suite/tests/valid/unicode-literal.toml b/test-suite/tests/valid/unicode-literal.toml deleted file mode 100644 index c65723c..0000000 --- a/test-suite/tests/valid/unicode-literal.toml +++ /dev/null @@ -1 +0,0 @@ -answer = "δ" -- cgit v1.2.3