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