Skip to content

Commit

Permalink
test(edit): Add reproduction for 527
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Mar 8, 2023
1 parent e4b5ed4 commit 2a42c64
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions crates/toml_edit/tests/testsuite/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,23 @@ 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 expected = r#"
[package]
metadata.msrv = "1.65.0"
"#;
let document = input.parse::<Document>().unwrap();
let actual = document.to_string();
assert_eq(expected, actual);
}

#[test]
fn fruit() {
let table = r#"
Expand Down

0 comments on commit 2a42c64

Please sign in to comment.