diff options
| author | Dave Henderson <dhenderson@gmail.com> | 2019-02-16 00:36:18 -0500 |
|---|---|---|
| committer | Dave Henderson <dhenderson@gmail.com> | 2019-02-16 11:11:08 -0500 |
| commit | effecf8007507ee2e90e5462ff6ef7dbc8871d3f (patch) | |
| tree | 8f5a2ea446e1c3daaa05e4acbac62756786ba33a /tests | |
| parent | ffb7d693baa8f95df96484e9b1a9c6267be066cf (diff) | |
New functions strings.CamelCase and strings.SnakeCase
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/integration/strings_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/integration/strings_test.go b/tests/integration/strings_test.go index affd8f32..4b9db835 100644 --- a/tests/integration/strings_test.go +++ b/tests/integration/strings_test.go @@ -49,3 +49,14 @@ func (s *StringsSuite) TestSlug(c *C) { `{{ strings.Slug "Hellö, Wôrld! Free @ last..." }}`) result.Assert(c, icmd.Expected{ExitCode: 0, Out: `hello-world-free-at-last`}) } + +func (s *StringsSuite) TestCaseFuncs(c *C) { + result := icmd.RunCommand(GomplateBin, "-i", + `{{ strings.CamelCase "Hellö, Wôrld! Free @ last..." }} +{{ strings.SnakeCase "Hellö, Wôrld! Free @ last..." }} +{{ strings.KebabCase "Hellö, Wôrld! Free @ last..." }}`) + result.Assert(c, icmd.Expected{ExitCode: 0, Out: `HellöWôrldFreeLast +Hellö_wôrld_free_last +Hellö-wôrld-free-last`}) + +} |
