From 957c0d3488de7bc25c8f257cdf4d003bf174bafd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Mon, 18 Mar 2024 16:40:43 +0000 Subject: [PATCH] Side-step small SVG width divergence by setting min-width --- src/tools/compiletest/src/runtest.rs | 2 +- tests/ui/codemap_tests/huge_multispan_highlight.svg | 2 +- tests/ui/diagnostic-flags/colored-session-opt-error.svg | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 83c595ce241..c99600b8c31 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -4004,7 +4004,7 @@ fn load_compare_outputs( }; let stderr = if force_color_svg { - anstyle_svg::Term::new().render_svg(&proc_res.stderr) + anstyle_svg::Term::new().min_width_px(730).render_svg(&proc_res.stderr) } else if explicit_format { proc_res.stderr.clone() } else { diff --git a/tests/ui/codemap_tests/huge_multispan_highlight.svg b/tests/ui/codemap_tests/huge_multispan_highlight.svg index 403e9961102..f26a2bd7275 100644 --- a/tests/ui/codemap_tests/huge_multispan_highlight.svg +++ b/tests/ui/codemap_tests/huge_multispan_highlight.svg @@ -1,4 +1,4 @@ - +