mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-05 09:04:58 +08:00
Fixes auto expansion of properties #1127
This commit is contained in:
@@ -83,6 +83,13 @@ var propertyScenarios = []formatScenario{
|
||||
expected: expectedDecodedYaml,
|
||||
scenarioType: "decode",
|
||||
},
|
||||
{
|
||||
description: "does not expand automatically",
|
||||
skipDoc: true,
|
||||
input: "mike = ${dontExpand} this",
|
||||
expected: "mike: ${dontExpand} this\n",
|
||||
scenarioType: "decode",
|
||||
},
|
||||
{
|
||||
description: "Roundtrip",
|
||||
input: expectedProperties,
|
||||
@@ -176,6 +183,9 @@ func documentRoundTripPropertyScenario(w *bufio.Writer, s formatScenario) {
|
||||
|
||||
func documentPropertyScenario(t *testing.T, w *bufio.Writer, i interface{}) {
|
||||
s := i.(formatScenario)
|
||||
if s.skipDoc {
|
||||
return
|
||||
}
|
||||
if s.scenarioType == "decode" {
|
||||
documentDecodePropertyScenario(w, s)
|
||||
} else if s.scenarioType == "roundtrip" {
|
||||
|
||||
Reference in New Issue
Block a user