diff options
Diffstat (limited to 'funcs/regexp_test.go')
| -rw-r--r-- | funcs/regexp_test.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/funcs/regexp_test.go b/funcs/regexp_test.go new file mode 100644 index 00000000..31671da0 --- /dev/null +++ b/funcs/regexp_test.go @@ -0,0 +1,17 @@ +package funcs + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestReplace(t *testing.T) { + re := &ReFuncs{} + assert.Equal(t, "hello world", re.Replace("i", "ello", "hi world")) +} + +func TestMatch(t *testing.T) { + re := &ReFuncs{} + assert.True(t, re.Match(`i\ `, "hi world")) +} |
