at function for objects

This commit is contained in:
pantor committed 2021-06-09 22:26:07 +02:00
1 parent b473873853
commit 4e909475ea
3 files changed
+10 -1

No files matched your search

+2
View File
@@ -70,6 +70,8 @@ TEST_CASE("functions") {
SUBCASE("at") {
CHECK(env.render("{{ at(names, 0) }}", data) == "Jeff");
CHECK(env.render("{{ at(names, i) }}", data) == "Seb");
CHECK(env.render("{{ at(brother, \"name\") }}", data) == "Chris");
CHECK(env.render("{{ at(at(brother, \"daughters\"), 0) }}", data) == "Maria");
// CHECK(env.render("{{ at(names, 45) }}", data) == "Jeff");
}