diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-08-06 18:54:19 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-08-06 18:54:19 +0200 |
commit | 9f3e09832081bc029dc98ae6dda49ee86d138fde (patch) | |
tree | 9bb699abd5e9aa4b188188514b04c0bb22b95b72 /filter/test.conf | |
parent | ef113c6f725349a2ab52f3cbef18403f82c84134 (diff) |
Filter: Allow to use set constants / expressions in path masks
Allow to not only use set literals in path masks, but also existing
set constants or set expressions.
Diffstat (limited to 'filter/test.conf')
-rw-r--r-- | filter/test.conf | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/filter/test.conf b/filter/test.conf index 04074965..09a4a88a 100644 --- a/filter/test.conf +++ b/filter/test.conf @@ -597,11 +597,15 @@ function mkpath(int a; int b) return [= a b 3 2 1 =]; } +define set35 = [3 .. 5]; + function t_path() bgpmask pm1; bgppath p2; +int set set12; { pm1 = [= 4 3 2 1 =]; + set12 = [1, 2]; bt_assert(format(pm1) = "[= 4 3 2 1 =]"); @@ -627,6 +631,7 @@ bgppath p2; bt_assert(p2 ~ [= * 4 3 * 1 =]); bt_assert(p2 ~ [= (3+2) (2*2) 3 2 1 =]); bt_assert(p2 ~ [= 5 [2, 4, 6] 3 [1..2] 1 =]); + bt_assert(p2 ~ [= 5 set35 3 set12 set12 =]); bt_assert(p2 ~ mkpath(5, 4)); bt_assert(p2.len = 5); |