printer: add list example

This commit is contained in:
Fatih Arslan 2015-10-25 21:18:46 +03:00
parent c703010b7f
commit c9e7ec3621
3 changed files with 49 additions and 0 deletions

View File

@ -25,6 +25,7 @@ type entry struct {
// Use go test -update to create/update the respective golden files.
var data = []entry{
{"complexhcl.input", "complexhcl.golden"},
{"list.input", "list.golden"},
}
func TestFiles(t *testing.T) {

27
printer/testdata/list.golden vendored Normal file
View File

@ -0,0 +1,27 @@
foo = ["fatih", "arslan"]
foo = ["bar", "qaz"]
foo = ["zeynep",
"arslan",
]
foo = ["fatih", "zeynep",
"arslan",
]
foo = [
"vim-go",
"golang",
"hcl",
]
foo = []
foo = [1, 2, 3, 4]
foo = [
"kenya",
"ethiopia",
"columbia",
]

21
printer/testdata/list.input vendored Normal file
View File

@ -0,0 +1,21 @@
foo = ["fatih", "arslan" ]
foo = [ "bar", "qaz", ]
foo = [ "zeynep",
"arslan", ]
foo = ["fatih", "zeynep",
"arslan", ]
foo = [
"vim-go",
"golang", "hcl"]
foo = []
foo = [1, 2,3, 4]
foo = [
"kenya", "ethiopia",
"columbia"]