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