add more heredoc tests
This commit is contained in:
parent
616214bb2e
commit
aed824cf55
@ -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,
|
||||
|
4
test-fixtures/multiline.hcl
Normal file
4
test-fixtures/multiline.hcl
Normal file
@ -0,0 +1,4 @@
|
||||
foo = <<EOF
|
||||
bar
|
||||
baz
|
||||
EOF
|
@ -1,4 +1,4 @@
|
||||
foo = <<EOF
|
||||
foo = <EOF
|
||||
bar
|
||||
baz
|
||||
EOF
|
||||
|
5
test-fixtures/multiline_no_eof.hcl
Normal file
5
test-fixtures/multiline_no_eof.hcl
Normal file
@ -0,0 +1,5 @@
|
||||
foo = <<EOF
|
||||
bar
|
||||
baz
|
||||
EOF
|
||||
key = "value"
|
1
test-fixtures/multiline_no_marker.hcl
Normal file
1
test-fixtures/multiline_no_marker.hcl
Normal file
@ -0,0 +1 @@
|
||||
foo = <<
|
Loading…
Reference in New Issue
Block a user