REGTESTS: add more complex check conditions to check_conditions.vtc
authorWilly Tarreau <w@1wt.eu>
Sat, 17 Jul 2021 08:43:33 +0000 (10:43 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 17 Jul 2021 09:01:47 +0000 (11:01 +0200)
commitf2e44d4e871f2a3854728ad1c9ede8894df96033
tree9303ca7db69fc54e188f56cd2494be43ce4810da
parentb333db3fd246bf65e3bf0461f3ff638123bf9839
REGTESTS: add more complex check conditions to check_conditions.vtc

Now that we support logic expressions, variables and parenthesis, let's
add a few more tests to check_conditions.vtc. The tests are conditionned
by the version being at least 2.5-dev2 so that it will not cause failures
during a possible later bisect session or if backported.

The test verifies that exported variables are seen, that operators precedence
works as expected, that parenthesis work at least through two levels, that an
empty condition is false while a negative number is true, and that extraneous
chars in an expression, or unfinished strings are properly caught.
reg-tests/startup/check_condition.vtc