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
+3 -1
View File
@@ -51,7 +51,9 @@ func TestAPartWithNoEffectRendersAsWithoutIt(t *testing.T) {
`{"format":"{word as w}x","word":["a","b"]}`: `"x"`,
`null`: `""`,
`{"format":"{p}","p":{"format":"{x}","x":[null,"a"]}}`: `{"format":"{p}","p":{"format":"{x}","x":["","a"]}}`,
`"{int(5,5)}"`: `"5"`,
`"{int(5,5)}"`: `"5"`,
`{"format":"{x}","x":["a","b"],"repeat":0}`: `""`,
`"{digits(0)}{upper(0)}{lower(0)}{hex(0)}{base64(0)}{nanoid(0)}"`: `""`,
`"{float(1,1,2)}"`: `"1.00"`,
`"{date(1990-01-01,1990-01-01,'2006-01-02')}"`: `"1990-01-01"`,
`"{date(1990-01-01,1990-12-31,'x')}"`: `"x"`,