summaryrefslogtreecommitdiff
path: root/internal/tests/integration/regexp_test.go
blob: fed833ace28181fd6c8adee5f5b4c2911f6df07f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
package integration

import (
	"testing"
)

func TestRegexp_Replace(t *testing.T) {
	inOutTest(t, `{{ "1.2.3-59" | regexp.Replace "-([0-9]*)" ".$1" }}`, "1.2.3.59")
}

func TestRegexp_QuoteMeta(t *testing.T) {
	inOutTest(t, "{{ regexp.QuoteMeta `foo{(\\` }}", `foo\{\(\\`)
}