diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
commit | 9835e2ae736235810b4ea1c162ca5e65c547e770 (patch) | |
tree | 3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/toml_edit/tests | |
parent | Releasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff) | |
download | rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip |
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/toml_edit/tests')
-rw-r--r-- | vendor/toml_edit/tests/testsuite/parse.rs | 29 |
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); +} |