Answer architecture round 3: walk a table's row node in the cycle check, record where the read-once spelling meets an inline refusal, and cite goal 5.2 for a path tag drawing afresh

This commit is contained in:
2026-10-05 09:42:54 +02:00
committed by Lillem4n
parent 938bbb5c43
commit f4a05fbb36
4 changed files with 19 additions and 3 deletions
+11
View File
@@ -339,3 +339,14 @@ func TestSlashAfterAReferenceSigilIsRejected(t *testing.T) {
}
}
}
func TestACycleThroughASelectedRowIsRefused(t *testing.T) {
_, err := New(WithoutShippedData(), WithDataPath(writeFiles(t, map[string]string{
"x.json": `{"format":"{v} {/y}","rows":"x.tsv","key":"code"}`,
"x.tsv": "code\tv\n1\ta\n2\tb\n",
"y.json": `"{/x[1]}"`,
})))
if err == nil || !strings.Contains(err.Error(), "cycle") {
t.Fatalf("New = %v, want the cycle through x[1] refused", err)
}
}