mirror of
https://github.com/mikefarah/yq.git
synced 2024-12-19 20:19:04 +00:00
moved string space test to op values test cases
This commit is contained in:
parent
540d4953f5
commit
2aab79431c
@ -12,13 +12,6 @@ var assignOperatorScenarios = []expressionScenario{
|
|||||||
"D0, P[], ()::a:\n b: cat\nx: frog\n",
|
"D0, P[], ()::a:\n b: cat\nx: frog\n",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
description: "Create yaml file with value with spaces",
|
|
||||||
expression: `.a.b = "cat" | .x = "frog jumps"`,
|
|
||||||
expected: []string{
|
|
||||||
"D0, P[], ()::a:\n b: cat\nx: frog jumps\n",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
description: "Update node to be the child value",
|
description: "Update node to be the child value",
|
||||||
document: `{a: {b: {g: foof}}}`,
|
document: `{a: {b: {g: foof}}}`,
|
||||||
|
@ -36,13 +36,22 @@ var valueOperatorScenarios = []expressionScenario{
|
|||||||
expected: []string{
|
expected: []string{
|
||||||
"D0, P[], (!!float)::5e-10\n",
|
"D0, P[], (!!float)::5e-10\n",
|
||||||
},
|
},
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
document: ``,
|
document: ``,
|
||||||
expression: `"cat"`,
|
expression: `"cat"`,
|
||||||
expected: []string{
|
expected: []string{
|
||||||
"D0, P[], (!!str)::cat\n",
|
"D0, P[], (!!str)::cat\n",
|
||||||
},
|
},
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
|
document: ``,
|
||||||
|
expression: `"frog jumps"`,
|
||||||
|
expected: []string{
|
||||||
|
"D0, P[], (!!str)::frog jumps\n",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
document: ``,
|
document: ``,
|
||||||
expression: `"1.3"`,
|
expression: `"1.3"`,
|
||||||
expected: []string{
|
expected: []string{
|
||||||
|
Loading…
Reference in New Issue
Block a user