From 66ef6782c72ab6d259fe4b1c576602279d55ab11 Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Thu, 24 May 2018 08:41:51 -0400 Subject: Add strings.Slug function Signed-off-by: Dave Henderson --- test/integration/strings_test.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/integration/strings_test.go b/test/integration/strings_test.go index 029c1ce8..c8843de5 100644 --- a/test/integration/strings_test.go +++ b/test/integration/strings_test.go @@ -43,3 +43,9 @@ func (s *StringsSuite) TestRepeat(c *C) { `ba{{ strings.Repeat -1 "na" }}`) result.Assert(c, icmd.Expected{ExitCode: 1, Out: `negative count`}) } + +func (s *StringsSuite) TestSlug(c *C) { + result := icmd.RunCommand(GomplateBin, "-i", + `{{ strings.Slug "Hellö, Wôrld! Free @ last..." }}`) + result.Assert(c, icmd.Expected{ExitCode: 0, Out: `hello-world-free-at-last`}) +} -- cgit v1.2.3