From a6c9f0648db56175ee9e077e2ca631b678552835 Mon Sep 17 00:00:00 2001 From: Ondrej Filip Date: Thu, 28 May 2009 13:37:04 +0200 Subject: Missing boolean comparison added. --- filter/filter.c | 3 ++- filter/test.conf | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/filter/filter.c b/filter/filter.c index 313d2fa..944befb 100644 --- a/filter/filter.c +++ b/filter/filter.c @@ -120,7 +120,8 @@ val_compare(struct f_val v1, struct f_val v2) } switch (v1.type) { case T_ENUM: - case T_INT: + case T_INT: + case T_BOOL: case T_PAIR: if (v1.val.i == v2.val.i) return 0; if (v1.val.i < v2.val.i) return -1; diff --git a/filter/test.conf b/filter/test.conf index af88907..f1cdf04 100644 --- a/filter/test.conf +++ b/filter/test.conf @@ -155,6 +155,9 @@ string s; b = true; print "Testing bool: ", b, ", ", !b; + + if ( b = true ) then print "Testing bool comparison b = true: ", b; + else { print "*** FAIL: TRUE test failed" ; quitbird; } pxs = [ 1.2.0.0/16, 1.4.0.0/16+]; print "Testing prefix sets: "; @@ -202,4 +205,4 @@ int j; accept "ok I take that"; } -eval __startup(); \ No newline at end of file +eval __startup(); -- cgit v1.2.3