diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-02-10 14:59:26 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-02-10 14:59:26 +0100 |
commit | fae9be7782a161bdf93c83884d62941a34cbe518 (patch) | |
tree | 7be7983247aa8fa8adc7bd923eb483c621957651 /filter | |
parent | 7d1966689f3f748d8bfa36eef64ced6a750ecb47 (diff) | |
parent | 0efd646278987df023586d85817a848c2bb39a1d (diff) | |
download | bird-fae9be7782a161bdf93c83884d62941a34cbe518.tar bird-fae9be7782a161bdf93c83884d62941a34cbe518.zip |
Merge commit 'origin/master' into new
Diffstat (limited to 'filter')
-rw-r--r-- | filter/test.conf | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/filter/test.conf b/filter/test.conf index 2e82863..fb35afb 100644 --- a/filter/test.conf +++ b/filter/test.conf @@ -8,9 +8,10 @@ router id 62.168.0.1; define xyzzy = (120+10); +define '1a-a1' = (20+10); -function mkpair(int a) +function 'mkpair-a'(int a) { return (1, a); } @@ -132,7 +133,8 @@ pair pp; int set is; prefix set pxs; string s; -{ +{ + print "1a-a1 = 30: ", '1a-a1'; print "Testing filter language:"; i = four; i = 12*100 + 60/2 + i; @@ -149,9 +151,9 @@ string s; is = [ 2, 3, 4, 7..11 ]; print " must be true: ", 1.2.0.0/16 ~ [ 1.0.0.0/8{ 15 , 17 } ]; print " data types; must be true: ", 1.2.3.4 = 1.2.3.4, ",", 1 ~ [1,2,3], ",", 5 ~ [1..20], ",", 10 ~ is, ",", 2 ~ [ 1, 2, 3 ], ",", 5 ~ [ 4 .. 7 ], ",", 1.2.3.4 ~ [ 1.2.3.3..1.2.3.5 ], ",", 1.2.3.4 ~ 1.0.0.0/8, ",", 1.0.0.0/8 ~ 1.0.0.0/8, ",", 1.0.0.0/8 ~ [ 1.0.0.0/8+ ]; - print " must be true: ", true && true, ",", true || false, ",", ! false && ! false && true, ",", 1 < 2 && 1 != 3; + print " must be true: ", true && true, ",", true || false, ",", ! false && ! false && true, ",", 1 < 2 && 1 != 3, ",", true && true && ! false; -# print " must be true: ", defined(1), ",", defined(1.2.3.4), ",", 1 != 2, ",", 1 <= 2; + 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; px = 1.2.0.0/18; @@ -163,7 +165,7 @@ string s; print "Testing mask : 127.0.0.0 = ", p.mask(8); pp = (1, 2); - print "Testing pairs: (1,2) = ", (1,2), " = ", pp, " = ", (1,1+1), " = ", mkpair(2); + print "Testing pairs: (1,2) = ", (1,2), " = ", pp, " = ", (1,1+1), " = ", 'mkpair-a'(2); print " must be true: ", (1,2) = (1,1+1); print "Testing enums: ", RTS_DUMMY, " ", RTS_STATIC; |