summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2018-05-24 08:41:51 -0400
committerDave Henderson <dhenderson@gmail.com>2018-05-25 12:18:20 -0400
commit66ef6782c72ab6d259fe4b1c576602279d55ab11 (patch)
tree92cc87bb3b34d11cf30f5d6055e4a4f34f3e7589 /test
parent25d820c5148d5344a4a749f5218de8ab3e1a5a52 (diff)
Add strings.Slug function
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/integration/strings_test.go6
1 files changed, 6 insertions, 0 deletions
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`})
+}