diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/integration/typeconv_funcs.bats | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/integration/typeconv_funcs.bats b/test/integration/typeconv_funcs.bats index 46c735cc..0b22f311 100644 --- a/test/integration/typeconv_funcs.bats +++ b/test/integration/typeconv_funcs.bats @@ -89,3 +89,22 @@ Languages are: {{ join $c.lang " and " }}' [ "$status" -eq 0 ] [[ "${output}" == "Languages are: C and Go and COBOL" ]] } + +@test "'toml'" { + gomplate -i '{{ $t := `# comment +foo = "bar" + +[baz] +qux = "quux"` | toml -}} +{{ $t.baz.qux }}' + [ "$status" -eq 0 ] + [[ "${output}" == "quux" ]] +} + +@test "'toTOML'" { + gomplate -i '{{ "foo:\n bar:\n baz: qux" | yaml | toTOML }}' + [ "$status" -eq 0 ] + [[ "${output}" == "[foo] + [foo.bar] + baz = \"qux\"" ]] +}
\ No newline at end of file |
