mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-25 09:08:45 +05:00
Added OrderedNavigableMap implementation
This commit is contained in:
committed by
Dan Christian Bogos
parent
a14dbaeb49
commit
80cdfe78c9
@@ -22,6 +22,15 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestProcessReSearchReplaceNil(t *testing.T) {
|
||||
rsr := &ReSearchReplace{SearchRegexp: nil, ReplaceTemplate: "0$1@$2"}
|
||||
source := "<sip:+4986517174963@127.0.0.1;transport=tcp>"
|
||||
expectOut := ""
|
||||
if outStr := rsr.Process(source); outStr != expectOut {
|
||||
t.Error("Unexpected output from SearchReplace: ", outStr)
|
||||
}
|
||||
}
|
||||
|
||||
func TestProcessReSearchReplace(t *testing.T) {
|
||||
rsr := &ReSearchReplace{SearchRegexp: regexp.MustCompile(`sip:\+49(\d+)@(\d*\.\d*\.\d*\.\d*)`), ReplaceTemplate: "0$1@$2"}
|
||||
source := "<sip:+4986517174963@127.0.0.1;transport=tcp>"
|
||||
|
||||
Reference in New Issue
Block a user