summaryrefslogtreecommitdiffstats
path: root/filter/test.conf
diff options
context:
space:
mode:
Diffstat (limited to 'filter/test.conf')
-rw-r--r--filter/test.conf21
1 files changed, 17 insertions, 4 deletions
diff --git a/filter/test.conf b/filter/test.conf
index 4814396..18121c4 100644
--- a/filter/test.conf
+++ b/filter/test.conf
@@ -9,6 +9,7 @@ router id 62.168.0.1;
define xyzzy = (120+10);
define '1a-a1' = (20+10);
+define one = 1;
function 'mkpair-a'(int a)
@@ -76,14 +77,26 @@ clist l;
print "Should be true: ", p2 ~ pm1, " ", p2, " ", pm1;
l = - empty -;
- l = add( l, (1,2) );
- l = add( l, (2,3) );
+ l = add( l, (one,2) );
+ l = add( l, (2,one+2) );
print "Community list (1,2) (2,3) ", l;
- print "Should be true: ", (2,3) ~ l, " ", l ~ [(1,*)], " ", l ~ [(2,3)];
+ print "Should be true: ", (2,3) ~ l, " ", l ~ [(1,*)], " ", l ~ [(2,3)]," ", l ~ [(2,2..3)], " ", l ~ [(1,1..2)], " ", l ~ [(1,1)..(1,2)];
l = add( l, (2,5) );
+ l = add( l, (5,one) );
+ l = add( l, (6,one) );
+ l = add( l, (one,one) );
+ l = delete( l, [(5,1),(6,one),(one,1)] );
+ l = delete( l, [(5,one),(6,one)] );
l = delete( l, [(2,*)] );
print "Community list (1,2) ", l;
- print "Should be false: ", (2,3) ~ l, " ", l ~ [(2,*)];
+ print "Should be false: ", (2,3) ~ l, " ", l ~ [(2,*)], " ", l ~ [(one,3..6)];
+ l = add( l, (3,one) );
+ l = add( l, (one+one+one,one+one) );
+ l = add( l, (3,3) );
+ l = add( l, (3,4) );
+ l = add( l, (3,5) );
+ l = delete( l, [(3,2..4)] );
+ print "Community list (1,2) (3,1) (3,5) ", l;
}
function bla()