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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user