diff options
Diffstat (limited to 'filter/test.conf')
-rw-r--r-- | filter/test.conf | 25 |
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) ); |