aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Du <alanhdu@gmail.com>2017-06-01 10:29:11 +0100
committerAlan Du <alanhdu@gmail.com>2017-06-01 12:42:16 +0100
commit20dced6967398c19ae8d502bd916cc294df6a3d4 (patch)
tree56d5a901235aa8fb7c157c0f348b257c54fa1648
parentba505647f21a1355e1f36e2263fe6fd639adc38a (diff)
downloadmilf-rs-20dced6967398c19ae8d502bd916cc294df6a3d4.tar.gz
milf-rs-20dced6967398c19ae8d502bd916cc294df6a3d4.zip
Add test case
-rw-r--r--tests/valid.rs4
-rw-r--r--tests/valid/table-array-nest-no-keys.json14
-rw-r--r--tests/valid/table-array-nest-no-keys.toml6
3 files changed, 24 insertions, 0 deletions
diff --git a/tests/valid.rs b/tests/valid.rs
index e8ea6af..676fc67 100644
--- a/tests/valid.rs
+++ b/tests/valid.rs
@@ -189,3 +189,7 @@ test!(example4,
test!(example_bom,
include_str!("valid/example-bom.toml"),
include_str!("valid/example.json"));
+
+test!(table_array_nest_no_keys,
+ include_str!("valid/table-array-nest-no-keys.toml"),
+ include_str!("valid/table-array-nest-no-keys.json"));
diff --git a/tests/valid/table-array-nest-no-keys.json b/tests/valid/table-array-nest-no-keys.json
new file mode 100644
index 0000000..7537b1a
--- /dev/null
+++ b/tests/valid/table-array-nest-no-keys.json
@@ -0,0 +1,14 @@
+{
+ "albums": [
+ {
+ "songs": [{}, {}]
+ }
+ ],
+ "artists": [
+ {
+ "home": {
+ "address": {}
+ }
+ }
+ ]
+}
diff --git a/tests/valid/table-array-nest-no-keys.toml b/tests/valid/table-array-nest-no-keys.toml
new file mode 100644
index 0000000..ad6eb10
--- /dev/null
+++ b/tests/valid/table-array-nest-no-keys.toml
@@ -0,0 +1,6 @@
+[[ albums ]]
+ [[ albums.songs ]]
+ [[ albums.songs ]]
+
+[[ artists ]]
+ [ artists.home.address ]