Test blank stdin rendering, a category reading itself as a fresh draw, a bare number or boolean refused in a record column, a one-item choice of weight 0 refused, and a hidden rows file read

This commit is contained in:
2026-10-08 11:48:08 +02:00
committed by Lillem4n
parent 66509abf1e
commit dd09d7ae82
6 changed files with 62 additions and 27 deletions
+1 -1
View File
@@ -590,7 +590,7 @@ func TestTableFences(t *testing.T) {
"format names no column": {map[string]string{"t.json": `{"format":"{b}","rows":"t.tsv"}`, "t.tsv": "a\nx\ny\n"}, `no column "b"`},
"format reads into a column": {map[string]string{"t.json": `{"format":"{a.x}","rows":"t.tsv"}`, "t.tsv": "a\nx\ny\n"}, `"a"`},
"a reference into a column": {with(base, map[string]string{"t.json": `"{/region.name.x}"`}), "column"},
"a category referencing itself": {map[string]string{"t.json": `{"format":"{a}","rows":"t.tsv"}`, "t.tsv": "a\n{/t.a}\ny\n"}, "names the category it sits in"},
"a category referencing itself": {map[string]string{"t.json": `{"format":"{a}","rows":"t.tsv"}`, "t.tsv": "a\n{/t.a}\ny\n"}, "cycle"},
}
for name, c := range rejected {
_, err := New(WithoutShippedData(), WithDataPath(writeFiles(t, c.files)))