summaryrefslogtreecommitdiff
path: root/funcs/strings_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'funcs/strings_test.go')
-rw-r--r--funcs/strings_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/funcs/strings_test.go b/funcs/strings_test.go
new file mode 100644
index 00000000..69bfabd9
--- /dev/null
+++ b/funcs/strings_test.go
@@ -0,0 +1,16 @@
+package funcs
+
+import (
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+)
+
+func TestReplaceAll(t *testing.T) {
+ sf := &StringFuncs{}
+
+ assert.Equal(t, "Replaced",
+ sf.ReplaceAll("Orig", "Replaced", "Orig"))
+ assert.Equal(t, "ReplacedReplaced",
+ sf.ReplaceAll("Orig", "Replaced", "OrigOrig"))
+}