From e1e05d85e32db69a94289892c86b517513e1ce90 Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Sun, 1 Mar 2020 17:21:04 +1100 Subject: [PATCH] Added another multistring test --- cmd/commands_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/cmd/commands_test.go b/cmd/commands_test.go index 2099111d..3b7cb0c7 100644 --- a/cmd/commands_test.go +++ b/cmd/commands_test.go @@ -443,6 +443,25 @@ hijklmno 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) { content := `name: true` filename := test.WriteTempYamlFile(content)