summaryrefslogtreecommitdiff
path: root/filter/test.conf
diff options
context:
space:
mode:
Diffstat (limited to 'filter/test.conf')
-rw-r--r--filter/test.conf9
1 files changed, 6 insertions, 3 deletions
diff --git a/filter/test.conf b/filter/test.conf
index 84faca0e..a99d0a51 100644
--- a/filter/test.conf
+++ b/filter/test.conf
@@ -13,6 +13,9 @@ define '1a-a1' = (20+10);
define one = 1;
define ten = 10;
+define p23 = (2, 3);
+define ip1222 = 1.2.2.2;
+
function onef(int a)
{
return 1;
@@ -98,7 +101,7 @@ eclist el2;
print "Should be true: ", p2 ~ pm1, " ", p2 ~ pm2, " ", 3 ~ p2, " ", p2 ~ [2, 10..20], " ", p2 ~ [4, 10..20];
print "4 = ", p2.len;
p2 = prepend( p2, 5 );
- print "Should be false: ", p2 ~ pm1, " ", p2 ~ pm2, " ", 10 ~ p2, " ", p2 ~ [8, 10..20],;
+ print "Should be false: ", p2 ~ pm1, " ", p2 ~ pm2, " ", 10 ~ p2, " ", p2 ~ [8, ten..(2*ten)];
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 true: ", p2 ~ [= (3+2) (2*2) 3 2 1 =], " ", p2 ~ mkpath(5, 4);
@@ -124,7 +127,7 @@ eclist el2;
print "Should be always true: ", l ~ [(*,*)];
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)]," ", l ~ [(2,2..3)], " ", l ~ [(1,1..2)], " ", l ~ [(1,1)..(1,2)];
+ print "Should be true: ", (2,3) ~ l, " ", l ~ [(1,*)], " ", l ~ [p23]," ", 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) );
@@ -361,7 +364,7 @@ string st;
if ( b = true ) then print "Testing bool comparison b = true: ", b;
else { print "*** FAIL: TRUE test failed" ; quitbird; }
- ips = [ 1.1.1.0 .. 1.1.1.255, 1.2.2.2];
+ ips = [ 1.1.1.0 .. 1.1.1.255, ip1222];
print "Testing IP sets: ";
print ips;
print " must be true: ", 1.1.1.0 ~ ips, ",", 1.1.1.100 ~ ips, ",", 1.2.2.2 ~ ips;