add more heredoc tests

This commit is contained in:
Mitchell Hashimoto 2015-11-10 15:08:59 -08:00
parent 616214bb2e
commit aed824cf55
5 changed files with 26 additions and 1 deletions

View File

@ -59,9 +59,24 @@ func TestDecode_interface(t *testing.T) {
},
{
"multiline_bad.hcl",
true,
nil,
},
{
"multiline_no_marker.hcl",
true,
nil,
},
{
"multiline.hcl",
false,
map[string]interface{}{"foo": "bar\nbaz\n"},
},
{
"multiline_no_eof.hcl",
false,
map[string]interface{}{"foo": "bar\nbaz\n", "key": "value"},
},
{
"multiline.json",
false,

View File

@ -0,0 +1,4 @@
foo = <<EOF
bar
baz
EOF

View File

@ -1,4 +1,4 @@
foo = <<EOF
foo = <EOF
bar
baz
EOF

View File

@ -0,0 +1,5 @@
foo = <<EOF
bar
baz
EOF
key = "value"

View File

@ -0,0 +1 @@
foo = <<