From 05cc885d01046221f3398f787f87e5a0c9161787 Mon Sep 17 00:00:00 2001 From: jdx <216188+jdx@users.noreply.github.com> Date: Sun, 18 Jan 2026 21:35:10 -0600 Subject: [PATCH] chore: fix legacy inline snapshot format warnings Update inline snapshots in markdown arg/flag tests to include the actual output (with leading newlines) using raw string literals. This resolves the "existing value is in a legacy format" warnings that appeared during test runs. Co-Authored-By: Claude Opus 4.5 --- lib/src/docs/markdown/arg.rs | 5 ++++- lib/src/docs/markdown/flag.rs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/src/docs/markdown/arg.rs b/lib/src/docs/markdown/arg.rs index 916eab01..a8bd6007 100644 --- a/lib/src/docs/markdown/arg.rs +++ b/lib/src/docs/markdown/arg.rs @@ -22,6 +22,9 @@ mod tests { fn test_render_markdown_arg() { let spec = spec! { r#"arg "arg1" help="arg1 description""# }.unwrap(); let ctx = MarkdownRenderer::new(spec.clone()); - assert_snapshot!(ctx.render_arg(&spec.cmd.args[0]).unwrap(), @"arg1 description"); + assert_snapshot!(ctx.render_arg(&spec.cmd.args[0]).unwrap(), @r" + + +arg1 description"); } } diff --git a/lib/src/docs/markdown/flag.rs b/lib/src/docs/markdown/flag.rs index db86718d..58f76786 100644 --- a/lib/src/docs/markdown/flag.rs +++ b/lib/src/docs/markdown/flag.rs @@ -22,6 +22,9 @@ mod tests { fn test_render_markdown_flag() { let spec = spec! { r#"flag "--flag1" help="flag1 description""# }.unwrap(); let ctx = MarkdownRenderer::new(spec.clone()).with_replace_pre_with_code_fences(true); - assert_snapshot!(ctx.render_flag(&spec.cmd.flags[0]).unwrap(), @"flag1 description"); + assert_snapshot!(ctx.render_flag(&spec.cmd.flags[0]).unwrap(), @r" + + +flag1 description"); } }