summaryrefslogtreecommitdiffstats
path: root/filter/test.conf
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-05-22 22:47:24 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2010-05-22 22:47:24 +0200
commitba5c0057ed01fb006b7a6fb1bd8c21f0c9ae12be (patch)
treebcbab1f5404ec81e6d5eef038ce4104a20866368 /filter/test.conf
parent6d04ef8987f6f5483d353d393ef66dae4b887f30 (diff)
downloadbird-ba5c0057ed01fb006b7a6fb1bd8c21f0c9ae12be.tar
bird-ba5c0057ed01fb006b7a6fb1bd8c21f0c9ae12be.zip
Extends pair set syntax, matching and deleting against clist.
Expressions like (123,*) can be used in pair set literals, clists can be matched against pair sets (community ~ pairset) and pair sets can be used to specify items to delete from clists (community.delete(pairset)).
Diffstat (limited to 'filter/test.conf')
-rw-r--r--filter/test.conf12
1 files changed, 7 insertions, 5 deletions
diff --git a/filter/test.conf b/filter/test.conf
index aca049c..4814396 100644
--- a/filter/test.conf
+++ b/filter/test.conf
@@ -79,10 +79,11 @@ clist l;
l = add( l, (1,2) );
l = add( l, (2,3) );
print "Community list (1,2) (2,3) ", l;
- print "Should be true: ", (2,3) ~ l;
- l = delete( l, (2,3) );
+ print "Should be true: ", (2,3) ~ l, " ", l ~ [(1,*)], " ", l ~ [(2,3)];
+ l = add( l, (2,5) );
+ l = delete( l, [(2,*)] );
print "Community list (1,2) ", l;
- print "Should be false: ", (2,3) ~ l;
+ print "Should be false: ", (2,3) ~ l, " ", l ~ [(2,*)];
}
function bla()
@@ -196,8 +197,9 @@ string s;
", true: ", RTS_STATIC ~ [RTS_STATIC, RTS_DEVICE],
", false: ", RTS_BGP ~ [RTS_STATIC, RTS_DEVICE];
- ps = [(1,2), (3,4)..(3,8)];
- print "Testing pair set (TTF):", pp ~ ps, " ", (3,5) ~ ps, " ", (3,9) ~ ps;
+ ps = [(1,2), (3,4)..(4,8), (5,*)];
+ print "Testing pair set, true: ", pp ~ ps, " ", (3,5) ~ ps, " ", (4,1) ~ ps, " ", (5,4) ~ ps, " ", (5,65535) ~ ps;
+ print "Testing pair set, false: ", (3,3) ~ ps, " ", (4,9) ~ ps, " ", (4,65535) ~ ps, " ", (6,0) ~ ps ;
qq = 1.2.3.4;
print "Testinq quad: 1.2.3.4 = ", qq,