mirror of
https://github.com/mikefarah/yq.git
synced 2026-07-11 01:09:54 +00:00
Add test for stray empty quotes in @sh
This commit is contained in:
parent
8ebc0e5801
commit
9f0cf4987f
@ -266,6 +266,16 @@ var encoderDecoderOperatorScenarios = []expressionScenario{
|
|||||||
"D0, P[coolData], (!!str)::strings' with spaces and a '\\'quote\\'\n",
|
"D0, P[coolData], (!!str)::strings' with spaces and a '\\'quote\\'\n",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
description: "Encode a string to sh",
|
||||||
|
subdescription: "Watch out for stray '' (empty strings)",
|
||||||
|
document: "coolData: \"'starts, contains more '' and ends with a quote'\"",
|
||||||
|
expression: ".coolData | @sh",
|
||||||
|
expected: []string{
|
||||||
|
"D0, P[coolData], (!!str)::\\'starts,' contains more '\\'\\'' and ends with a quote'\\'\n",
|
||||||
|
},
|
||||||
|
skipDoc: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
description: "Decode a base64 encoded string",
|
description: "Decode a base64 encoded string",
|
||||||
subdescription: "Decoded data is assumed to be a string.",
|
subdescription: "Decoded data is assumed to be a string.",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user