Test a generator with no data, a repeat or count of 0 rendering nothing, and a name a choice's item binds and reads

This commit is contained in:
2026-10-07 23:46:11 +02:00
committed by Lillem4n
parent 07a0498c5e
commit 1e159fdf3a
9 changed files with 48 additions and 22 deletions
+6
View File
@@ -333,3 +333,9 @@ func TestATypedColumnProvesACalcOverAName(t *testing.T) {
t.Fatalf("New = %v, want the typed column refused over an operand that is not always a number", err)
}
}
func TestARepeatOfZeroIsNoConstant(t *testing.T) {
if got := mustRender(t, engine(1), `{"format":"{calc(x / y)}","x":"1","y":{"format":"0","repeat":0}}`); got != "NaN" {
t.Errorf("a divisor rendering nothing = %q, want NaN", got)
}
}