mirror of
https://github.com/mikefarah/yq.git
synced 2026-08-24 08:22:13 +08:00
Multiline value fix - multi line strings no longer printed as a yaml block
Although printing the string as a yaml block can be argued to be technically correct, in practical terms it's more useful to just print out the multiline string as is.
This commit is contained in:
@@ -47,6 +47,14 @@ application: MyApp`,
|
||||
formattedResult)
|
||||
}
|
||||
|
||||
func TestMultilineString(t *testing.T) {
|
||||
testString := `
|
||||
abcd
|
||||
efg`
|
||||
formattedResult, _ := yamlToString(testString)
|
||||
assertResult(t, testString, formattedResult)
|
||||
}
|
||||
|
||||
func TestNewYaml(t *testing.T) {
|
||||
result, _ := newYaml([]string{"b.c", "3"})
|
||||
formattedResult := fmt.Sprintf("%v", result)
|
||||
|
||||
Reference in New Issue
Block a user