summaryrefslogtreecommitdiffstats
path: root/filter/test.conf
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2009-03-14 12:43:10 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2009-03-14 12:43:10 +0100
commitcf1860349182503523975fb8084d514407a75fb4 (patch)
tree24fbf737c0204f763ae0a29705706d4786308c3d /filter/test.conf
parentf16ad72ed76c398f081b97b09d56f4b199822464 (diff)
downloadbird-cf1860349182503523975fb8084d514407a75fb4.tar
bird-cf1860349182503523975fb8084d514407a75fb4.zip
New syntax for bgp_path
Diffstat (limited to 'filter/test.conf')
-rw-r--r--filter/test.conf25
1 files changed, 18 insertions, 7 deletions
diff --git a/filter/test.conf b/filter/test.conf
index 73a6519..96859e5 100644
--- a/filter/test.conf
+++ b/filter/test.conf
@@ -31,24 +31,35 @@ function fifteen()
}
function paths()
-bgpmask p;
+bgpmask pm1;
+bgpmask pm2;
bgppath p2;
clist l;
{
- p = / 4 3 2 1 /;
- print "Testing path masks: ", p;
+ pm1 = / 4 3 2 1 /;
+ pm2 = [= 4 3 2 1 =];
+ print "Testing path masks: ", pm1, " ", pm2;
p2 = prepend( + empty +, 1 );
p2 = prepend( p2, 2 );
p2 = prepend( p2, 3 );
p2 = prepend( p2, 4 );
print "Testing paths: ", p2;
- print "Should be true: ", p2 ~ p;
+ print "Should be true: ", p2 ~ pm1, " ", p2 ~ pm2;
print "4 = ", p2.len;
p2 = prepend( p2, 5 );
- print "Should be false: ", p2 ~ p;
- print "Should be true: ", p2 ~ / ? 4 3 2 1 /, p2, / ? 4 3 2 1 /;
- print "Should be true: ", p2 ~ / ? 4 3 ? 1 /, p2, / ? 4 3 ? 1 /;
+ print "Should be false: ", p2 ~ pm1, " ", p2 ~ pm2;
+ print "Should be true: ", p2 ~ / ? 4 3 2 1 /, " ", p2, " ", / ? 4 3 2 1 /;
+ print "Should be true: ", p2 ~ [= * 4 3 * 1 =], " ", p2, " ", [= * 4 3 * 1 =];
print "5 = ", p2.len;
+
+ pm1 = [= 1 2 * 3 4 5 =];
+ p2 = prepend( + empty +, 5 );
+ p2 = prepend( p2, 4 );
+ p2 = prepend( p2, 3 );
+ p2 = prepend( p2, 3 );
+ p2 = prepend( p2, 2 );
+ p2 = prepend( p2, 1 );
+ print "Should be true: ", p2 ~ pm1, " ", p2, " ", pm1;
l = - empty -;
l = add( l, (1,2) );