Skip to content

Commit 63f36f2

Browse files
committed
fix invalid snapshot file names for windows by stripping quotation marks
1 parent 4f6931f commit 63f36f2

File tree

8 files changed

+7
-6
lines changed

8 files changed

+7
-6
lines changed

egui_json_tree/tests/image_snapshot_tests.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,12 @@ fn render_object_search_results() {
8484
{
8585
*harness.state_mut() = search_default_expand;
8686
harness.run();
87-
if let Err(err) = harness.try_snapshot(format!(
87+
let filename = format!(
8888
"default_expand_search_results/{}_{:?}",
8989
idx, search_default_expand
90-
)) {
90+
)
91+
.replace("\"", "");
92+
if let Err(err) = harness.try_snapshot(filename) {
9193
snapshot_errors.push(err);
9294
}
9395
}
@@ -121,10 +123,9 @@ fn render_object_with_changing_default_expand_automatically_resets_expanded() {
121123
{
122124
*harness.state_mut() = default_expand;
123125
harness.run();
124-
if let Err(err) = harness.try_snapshot(format!(
125-
"changing_default_expand/{}_{:?}",
126-
idx, default_expand
127-
)) {
126+
let filename =
127+
format!("changing_default_expand/{}_{:?}", idx, default_expand).replace("\"", "");
128+
if let Err(err) = harness.try_snapshot(filename) {
128129
snapshot_errors.push(err);
129130
}
130131
}

0 commit comments

Comments
 (0)