Add tests for rsr and correctly value in diameter

This commit is contained in:
TeoV
2019-01-23 07:59:48 -05:00
committed by Dan Christian Bogos
parent bb54f1a29c
commit d998cf71ac
6 changed files with 168 additions and 7 deletions

View File

@@ -65,3 +65,10 @@ func TestProcessReSearchReplace5(t *testing.T) {
t.Error("Unexpected output from SearchReplace: ", outStr)
}
}
func TestProcessReSearchReplace6(t *testing.T) {
rsr := &ReSearchReplace{SearchRegexp: regexp.MustCompile(`(.*)`), ReplaceTemplate: "${1}_suffix"}
if outStr := rsr.Process("call"); outStr != "call_suffix" {
t.Error("Unexpected output from SearchReplace: ", outStr)
}
}