From 9835e2ae736235810b4ea1c162ca5e65c547e770 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 May 2024 04:49:50 +0200 Subject: Merging upstream version 1.71.1+dfsg1. Signed-off-by: Daniel Baumann --- vendor/toml_edit/tests/testsuite/parse.rs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'vendor/toml_edit/tests') 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 @@ -231,6 +231,19 @@ fn empty_table() { table["foo"].as_table().unwrap(); } +#[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::().unwrap(); + let actual = document.to_string(); + assert_eq(input, actual); +} + #[test] fn fruit() { let table = r#" @@ -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::().unwrap(); + let actual = document.to_string(); + assert_eq(input, actual); +} -- cgit v1.2.3