From cae1571aa76b98db7a1d94eac8f63cc012aa1dcf Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Mon, 27 Jun 2022 16:44:15 +0200 Subject: [PATCH] Add whiskers test for weird case --- test/libsolutil/Whiskers.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/libsolutil/Whiskers.cpp b/test/libsolutil/Whiskers.cpp index 3ccaa64da..4f148f101 100644 --- a/test/libsolutil/Whiskers.cpp +++ b/test/libsolutil/Whiskers.cpp @@ -85,6 +85,13 @@ BOOST_AUTO_TEST_CASE(conditional_with_else) BOOST_CHECK_EQUAL(Whiskers(templ)("b", false).render(), "Y"); } +BOOST_AUTO_TEST_CASE(broken_conditional_with_else) +{ + string templ = "X"; + BOOST_CHECK_EQUAL(Whiskers(templ)("b", true).render(), "X_^ - ";