moved string space test to op values test cases

This commit is contained in:
Mike Farah 2020-12-22 10:38:52 +11:00
parent 540d4953f5
commit 2aab79431c
2 changed files with 11 additions and 9 deletions

View File

@ -12,13 +12,6 @@ var assignOperatorScenarios = []expressionScenario{
"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",
document: `{a: {b: {g: foof}}}`,

View File

@ -36,13 +36,22 @@ var valueOperatorScenarios = []expressionScenario{
expected: []string{
"D0, P[], (!!float)::5e-10\n",
},
}, {
},
{
document: ``,
expression: `"cat"`,
expected: []string{
"D0, P[], (!!str)::cat\n",
},
}, {
},
{
document: ``,
expression: `"frog jumps"`,
expected: []string{
"D0, P[], (!!str)::frog jumps\n",
},
},
{
document: ``,
expression: `"1.3"`,
expected: []string{