summaryrefslogtreecommitdiffstats
path: root/filter
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2010-08-03 17:35:34 +0200
committerOndrej Filip <feela@network.cz>2010-08-03 17:35:34 +0200
commit946dc15c928d9a48cdcc857bc80f4fabf9a4e2bf (patch)
treeca33049ffa215410422dfbfd46d2307fb75b2c23 /filter
parente0e8c04a83bbe24cdcf3836ca171ce60db299b1f (diff)
downloadbird-946dc15c928d9a48cdcc857bc80f4fabf9a4e2bf.tar
bird-946dc15c928d9a48cdcc857bc80f4fabf9a4e2bf.zip
Documentation update and improvement of tests related to expressions in sets.
Diffstat (limited to 'filter')
-rw-r--r--filter/test.conf11
1 files changed, 6 insertions, 5 deletions
diff --git a/filter/test.conf b/filter/test.conf
index 18121c4..c25f11a 100644
--- a/filter/test.conf
+++ b/filter/test.conf
@@ -183,11 +183,12 @@ string s;
print " must be true: ", defined(1), ",", defined(1.2.3.4), ",", 1 != 2, ",", 1 <= 2;
print " data types: must be false: ", 1 ~ [ 2, 3, 4 ], ",", 5 ~ is, ",", 1.2.3.4 ~ [ 1.2.3.3, 1.2.3.5 ], ",", (1,2) > (2,2), ",", (1,1) > (1,1), ",", 1.0.0.0/9 ~ [ 1.0.0.0/8- ], ",", 1.2.0.0/17 ~ [ 1.0.0.0/8{ 15 , 16 } ], ",", true && false;
- is1 = [2, 3, 5, 8, 11, 15, 17, 19];
+ is1 = [one, (2+1), (6-one), 8, 11, 15, 17, 19];
is2 = [19, 17, 15, 11, 8, 5, 3, 2];
is3 = [5, 17, 2, 11, 8, 15, 3, 19];
- print " must be true: ", 2 ~ is1, " ", 2 ~ is2, " ", 2 ~ is3;
+ print " must be true: ", 1 ~ is1, " ", 3 ~ is1, " ", 5 ~ is1;
+ print " must be true: ", (one+2) ~ is1, " ", 2 ~ is2, " ", 2 ~ is3;
print " must be false: ", 4 ~ is1, " ", 4 ~ is2, " ", 4 ~ is3;
print " must be false: ", 10 ~ is1, " ", 10 ~ is2, " ", 10 ~ is3;
print " must be true: ", 15 ~ is1, " ", 15 ~ is2, " ", 15 ~ is3;
@@ -210,9 +211,9 @@ string s;
", true: ", RTS_STATIC ~ [RTS_STATIC, RTS_DEVICE],
", false: ", RTS_BGP ~ [RTS_STATIC, RTS_DEVICE];
- 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 ;
+ ps = [(1,(one+one)), (3,4)..(4,8), (5,*), (6,3..6)];
+ print "Testing pair set, true: ", pp ~ ps, " ", (3,5) ~ ps, " ", (4,1) ~ ps, " ", (5,4) ~ ps, " ", (5,65535) ~ ps, " ", (6,4) ~ ps;
+ print "Testing pair set, false: ", (3,3) ~ ps, " ", (4,9) ~ ps, " ", (4,65535) ~ ps, " ", (6,2) ~ ps, " ", (6,(6+one)) ~ ps, " ", ((one+6),2) ~ ps ;
qq = 1.2.3.4;
print "Testinq quad: 1.2.3.4 = ", qq,