From b1730c1956aed244d9d05255c95f427fdfcf4d1e Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Sun, 4 Jun 2017 16:04:36 -0400 Subject: Adding TOML support Signed-off-by: Dave Henderson --- test/integration/typeconv_funcs.bats | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'test') 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 -- cgit v1.2.3