Added another multistring test

This commit is contained in:
Mike Farah 2020-03-01 17:21:04 +11:00
parent b99467432e
commit e1e05d85e3

View File

@ -443,6 +443,25 @@ hijklmno
test.AssertResult(t, expectedOutput, result.Output) test.AssertResult(t, expectedOutput, result.Output)
} }
func TestReadQuotedMultinlineNoNewLineStringCmd(t *testing.T) {
content := `test: |-
abcdefg
hijklmno
`
filename := test.WriteTempYamlFile(content)
defer test.RemoveTempYamlFile(filename)
cmd := getRootCommand()
result := test.RunCmd(cmd, fmt.Sprintf("read %s test", filename))
if result.Error != nil {
t.Error(result.Error)
}
expectedOutput := `abcdefg
hijklmno
`
test.AssertResult(t, expectedOutput, result.Output)
}
func TestReadBooleanCmd(t *testing.T) { func TestReadBooleanCmd(t *testing.T) {
content := `name: true` content := `name: true`
filename := test.WriteTempYamlFile(content) filename := test.WriteTempYamlFile(content)