From c325246d4a8e4cd5f60f9548053b5385e20a4d2e Mon Sep 17 00:00:00 2001 From: Julian Knutsen Date: Mon, 19 Oct 2026 06:46:52 +0000 Subject: [PATCH] test(cmd/bd): pin mixed-case dep tree --format Mermaid through the CLI TestDepTreeFormatMermaidCaseInsensitive calls isMermaidTreeFormat directly, so reverting the runDepTree dispatch to formatStr == "mermaid" (the PR #6646 bug) kept every test green. Add a --format Mermaid call to the embedded tree_format_mermaid subtest so the flag-to-renderer wiring is pinned. AC: AC-1 AC: AC-2 Co-Authored-By: Claude Opus 5.5 --- cmd/bd/dep_embedded_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/bd/dep_embedded_test.go b/cmd/bd/dep_embedded_test.go index 187255af9..3e53e8e32 100644 --- a/cmd/bd/dep_embedded_test.go +++ b/cmd/bd/dep_embedded_test.go @@ -390,6 +390,14 @@ func TestEmbeddedDepBTreeAndCycles(t *testing.T) { if !strings.Contains(out, "flowchart") && !strings.Contains(out, "graph") { t.Errorf("expected mermaid flowchart/graph syntax: %s", out) } + // Mixed-case pins case-folding at the runDepTree dispatch site. + // TestDepTreeFormatMermaidCaseInsensitive calls isMermaidTreeFormat + // directly and would stay green if the call site went back to + // formatStr == "mermaid" (the PR #6646 bug). + mixed := bdDep(t, bd, dir, "tree", epic.ID, "--format", "Mermaid") + if !strings.Contains(mixed, "flowchart") && !strings.Contains(mixed, "graph") { + t.Errorf("expected mermaid flowchart/graph syntax for --format Mermaid: %s", mixed) + } }) t.Run("tree_json_output", func(t *testing.T) {