From 224dc146e229b8b2bdad531b666f83b554e59152 Mon Sep 17 00:00:00 2001 From: mxt Date: Sat, 9 Nov 2024 08:38:16 -0600 Subject: [PATCH] chore: add failing test for #163 --- crates/toml_edit/tests/testsuite/parse.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/crates/toml_edit/tests/testsuite/parse.rs b/crates/toml_edit/tests/testsuite/parse.rs index 39e00cfd..e437ca4e 100644 --- a/crates/toml_edit/tests/testsuite/parse.rs +++ b/crates/toml_edit/tests/testsuite/parse.rs @@ -1605,6 +1605,25 @@ clippy.exhaustive_enums = "warn" assert_data_eq!(actual, expected.raw()); } +#[test] +fn dotted_key_interspersed_roundtrip() { + let input = r###" +rust.unsafe_op_in_unsafe_fn = "deny" + +clippy.cast_lossless = "warn" +rust.explicit_outlives_requirements = "warn" + +clippy.doc_markdown = "warn" +clippy.exhaustive_enums = "warn" +"###; + let expected = input; + + let manifest: DocumentMut = input.parse().unwrap(); + let actual = manifest.to_string(); + + assert_data_eq!(actual, expected.raw()); +} + #[test] fn string_repr_roundtrip() { assert_string_repr_roundtrip(r#""""#, str![[r#""""#]]);