summaryrefslogtreecommitdiff
path: root/stringfunc_test.go
blob: 62d95dcb1d90649f1c448126ba36510c54539471 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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"))
}