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:
Mike Farah
2018-03-27 16:22:24 +11:00
parent 8f15dba812
commit ee8ffd458a
5 changed files with 26 additions and 2 deletions
+8
View File
@@ -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)