Store goldenfiles with trailing newline (#10900)

Release Notes:


- N/A
This commit is contained in:
Thorsten Ball 2024-04-23 19:13:04 +02:00 committed by GitHub
parent 2ee257a562
commit 85b26e9788
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 6 additions and 4 deletions

View File

@ -336,8 +336,10 @@ mod tests {
path.push("golden");
path.push(format!("{}.json", golden_filename));
let have_json =
let mut have_json =
serde_json::to_string_pretty(&entries).expect("could not serialize entries to JSON");
// We always want to save with a trailing newline.
have_json.push('\n');
let update = std::env::var("UPDATE_GOLDEN")
.map(|val| val.to_ascii_lowercase() == "true")

View File

@ -778,4 +778,4 @@
"previous": null,
"filename": "crates/vim/src/utils.rs"
}
]
]

View File

@ -132,4 +132,4 @@
"previous": null,
"filename": "file_b.txt"
}
]
]

View File

@ -132,4 +132,4 @@
"previous": null,
"filename": "index.js"
}
]
]