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", "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}}}`,

View File

@ -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{