Added test for null array json example

This commit is contained in:
Mike Farah 2023-05-04 14:48:57 +10:00
parent d14eaa9b49
commit 4d50b001d1
2 changed files with 8 additions and 1 deletions

2
go.mod
View File

@ -16,6 +16,7 @@ require (
github.com/spf13/cobra v1.7.0 github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5 github.com/spf13/pflag v1.0.5
golang.org/x/net v0.9.0 golang.org/x/net v0.9.0
golang.org/x/text v0.9.0
gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473 gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473
gopkg.in/yaml.v3 v3.0.1 gopkg.in/yaml.v3 v3.0.1
) )
@ -25,7 +26,6 @@ require (
github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect github.com/mattn/go-isatty v0.0.17 // indirect
golang.org/x/sys v0.7.0 // indirect golang.org/x/sys v0.7.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
) )

View File

@ -80,6 +80,13 @@ const roundTripMultiLineJson = `{
` `
var jsonScenarios = []formatScenario{ var jsonScenarios = []formatScenario{
{
description: "array null",
skipDoc: true,
input: "[null]",
scenarioType: "roundtrip-ndjson",
expected: "[null]\n",
},
{ {
description: "set tags", description: "set tags",
skipDoc: true, skipDoc: true,