mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-12 13:48:06 +00:00
Added another test
This commit is contained in:
parent
1c50ae4e6a
commit
54b355bffb
@ -116,9 +116,11 @@ var collectObjectOperatorScenarios = []expressionScenario{
|
||||
{
|
||||
skipDoc: true,
|
||||
document: `{name: Mike, pets: {cows: [apl, bba]}}`,
|
||||
document2: `{name: Rosey, pets: {sheep: [frog, meow]}}`,
|
||||
expression: `{"a":.name, "b":.pets}`,
|
||||
expected: []string{
|
||||
"D0, P[], (!!map)::a: Mike\nb: {cows: [apl, bba]}\n",
|
||||
"D0, P[], (!!map)::a: Rosey\nb: {sheep: [frog, meow]}\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -129,6 +131,13 @@ var collectObjectOperatorScenarios = []expressionScenario{
|
||||
"D0, P[], (!!map)::wrap: frog\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
skipDoc: true,
|
||||
expression: `{"wrap": "frog", "bing": "bong"}`,
|
||||
expected: []string{
|
||||
"D0, P[], (!!map)::wrap: frog\nbing: bong\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
skipDoc: true,
|
||||
document: `{name: Mike}`,
|
||||
|
Loading…
Reference in New Issue
Block a user