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#""""#]]);