]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5363] Added chained ifelse unit test trac5363
authorFrancis Dupont <fdupont@isc.org>
Fri, 29 Sep 2017 14:57:32 +0000 (16:57 +0200)
committerFrancis Dupont <fdupont@isc.org>
Fri, 29 Sep 2017 14:57:32 +0000 (16:57 +0200)
src/lib/eval/tests/evaluate_unittest.cc

index 3cb0bc2504d1fece7a718366e984d998adc6bd3f..04ffd337b8578dcc60b4b5d356d74cba91ae7043 100644 (file)
@@ -497,6 +497,13 @@ TEST_F(ExpressionsTest, evaluateString) {
                          "ifelse(option[100].exists,'foo','bar')", "foo");
     testExpressionString(Option::V4,
                          "ifelse(option[200].exists,'foo','bar')", "bar");
+
+    // Check that ifelse can be chained.
+    testExpressionString(Option::V4,
+                         "ifelse(option[200].exists,option[200].hex,"
+                                 "ifelse(option[100].exists,"
+                                         "option[100].hex,'none???'))",
+                         "hundred4");
 }
 
 };