Browse Source

[5363] Added chained ifelse unit test

Francis Dupont 7 years ago
parent
commit
866885465b
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/lib/eval/tests/evaluate_unittest.cc

+ 7 - 0
src/lib/eval/tests/evaluate_unittest.cc

@@ -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");
 }
 
 };