Test a declared datatype over a column read, repeats counting as written, null alone on stdin, one leading slash, and the CLI's lone reference against the grammar

This commit is contained in:
2026-10-07 22:51:44 +02:00
committed by Lillem4n
parent 43c56b20b9
commit 1a022dbd79
11 changed files with 146 additions and 71 deletions
+3
View File
@@ -269,6 +269,9 @@ func TestFakeStructErrors(t *testing.T) {
{&struct {
A int `fake:"{\"format\":\"{int(1,9)}\",\"datatype\":\"integer\"}"`
}{}, `its Go type int sets the datatype; drop "datatype"`},
{&struct {
A string `fake:"{\"format\":\"x\",\"datatype\":\"string\"}"`
}{}, `its Go type string sets the datatype; drop "datatype"`},
{&struct {
A int `fake:"[null,\"{int(1,9)}\"]"`
}{}, "can draw null, which int cannot hold; make it *int"},