Test that every {…} draws afresh and only a name keeps a pick, a field's and a struct's path tags included

This commit is contained in:
2026-10-05 09:05:35 +02:00
committed by Lillem4n
parent f87807adf7
commit 5b23ca7706
18 changed files with 608 additions and 1767 deletions
-7
View File
@@ -29,13 +29,6 @@ func TestPathCheckChoiceConsumesNoSegment(t *testing.T) {
}
}
func TestPathCoverStopsAtAChoice(t *testing.T) {
n := compiled(t, `[{"format":"{f}","f":"1"},{"format":"{f}","f":"2"}]`)
if cover := compilePath(n, []string{"f"}).cover; cover != n {
t.Fatalf("cover through a choice = %v, want the choice itself", cover)
}
}
func TestDrawStepsPanicsOnAStepItsNodeLacks(t *testing.T) {
defer func() {
if r := recover(); r == nil || !strings.Contains(fmt.Sprint(r), `no field "f"`) {