test(cmd/bd): pin mixed-case dep tree --format Mermaid through the CLI (#7697)
* 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 <noreply@anthropic.com> (cherry picked from commitc325246d4a) Ported-From: opus/c325246d4a8e4cd5f60f9548053b5385e20a4d2e AC: AC-1 * test(cmd/bd): record AC-2 mutant evidence for the mixed-case pin No code change: AC-2 is the mutant-killing property of the row added in the AC-1 commit. Evidence (bazel test //cmd/bd:bd_test --config=ci --test_filter='TestDepTreeFormat|TestEmbeddedDepBTreeAndCycles/tree_format_mermaid' --test_arg=-test.skip= --test_env=BEADS_TEST_EMBEDDED_DOLT=1 --test_output=all): - Mutant M1 (cmd/bd/dep_tree.go:153 changed to formatStr == "mermaid", isMermaidTreeFormat left intact), row absent: all targeted tests pass — the hole. - M1 applied, row present: TestEmbeddedDepBTreeAndCycles/tree_format_mermaid FAILS with the plain-text fall-through header ("Dependency tree for"), while TestDepTreeFormatMermaidCaseInsensitive, TestDepTreeFormatFlag and the lowercase e2e row stay green. - M1 reverted, row kept: all pass; no SKIPs in any run. AC: AC-2 Agent-Signature: claude-code-glm-5.3-unknown-reasoning on behalf of Julian Knutsen Co-Authored-By: Claude Code <noreply@anthropic.com> (cherry picked from commit38df0c5b22) Ported-From: glm/38df0c5b224c41fa312dd130b8e7fe378d74b0b4 AC: AC-2 --------- Co-authored-by: Julian Knutsen <julianknutsen@users.noreply.github.com>
This commit is contained in:
parent
8f960b1b6e
commit
6db46664da
1 changed files with 8 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue