Skip to content

Commit

Permalink
Added test for null array json example
Browse files Browse the repository at this point in the history
  • Loading branch information
mikefarah committed May 4, 2023
1 parent d14eaa9 commit 4d50b00
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -16,6 +16,7 @@ require (
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
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/yaml.v3 v3.0.1
)
Expand All @@ -25,7 +26,6 @@ require (
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // 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
)

Expand Down
7 changes: 7 additions & 0 deletions pkg/yqlib/json_test.go
Expand Up @@ -80,6 +80,13 @@ const roundTripMultiLineJson = `{
`

var jsonScenarios = []formatScenario{
{
description: "array null",
skipDoc: true,
input: "[null]",
scenarioType: "roundtrip-ndjson",
expected: "[null]\n",
},
{
description: "set tags",
skipDoc: true,
Expand Down

0 comments on commit 4d50b00

Please sign in to comment.