diff options
Diffstat (limited to 'table/policy_test.go')
-rw-r--r-- | table/policy_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/table/policy_test.go b/table/policy_test.go index 71e1a723..106eb275 100644 --- a/table/policy_test.go +++ b/table/policy_test.go @@ -2647,6 +2647,13 @@ func TestPolicyAs4PathPrependLastAs(t *testing.T) { }, newPath.GetAsSeqList()) } +func TestParseCommunityRegexp(t *testing.T) { + exp, err := ParseCommunityRegexp("65000:1") + assert.Equal(t, nil, err) + assert.Equal(t, true, exp.MatchString("65000:1")) + assert.Equal(t, false, exp.MatchString("65000:100")) +} + func createStatement(name, psname, nsname string, accept bool) config.Statement { c := config.Conditions{ MatchPrefixSet: config.MatchPrefixSet{ |