summaryrefslogtreecommitdiffstats
path: root/vendor/toml_edit/tests
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/toml_edit/tests')
-rw-r--r--vendor/toml_edit/tests/testsuite/parse.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/vendor/toml_edit/tests/testsuite/parse.rs b/vendor/toml_edit/tests/testsuite/parse.rs
index ed3ca3037..9f59f69dd 100644
--- a/vendor/toml_edit/tests/testsuite/parse.rs
+++ b/vendor/toml_edit/tests/testsuite/parse.rs
@@ -232,6 +232,19 @@ fn empty_table() {
}
#[test]
+fn mixed_table_issue_527() {
+ let input = r#"
+[package]
+metadata.msrv = "1.65.0"
+
+[package.metadata.release.pre-release-replacements]
+"#;
+ let document = input.parse::<Document>().unwrap();
+ let actual = document.to_string();
+ assert_eq(input, actual);
+}
+
+#[test]
fn fruit() {
let table = r#"
[[fruit]]
@@ -1446,3 +1459,19 @@ expected newline, `#`
"#
);
}
+
+#[test]
+fn dont_use_dotted_key_prefix_on_table_fuzz_57049() {
+ // This could generate
+ // ```toml
+ // [
+ // p.o]
+ // ```
+ let input = r#"
+p.a=4
+[p.o]
+"#;
+ let document = input.parse::<Document>().unwrap();
+ let actual = document.to_string();
+ assert_eq(input, actual);
+}