Merge pull request #13219 from ethereum/whiskers

Add whiskers test for weird case
This commit is contained in:
Mathias L. Baumann 2022-06-30 17:45:54 +02:00 committed by GitHub
commit 48669b4bec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 = "<?b>X<!bY</b>";
BOOST_CHECK_EQUAL(Whiskers(templ)("b", true).render(), "X<!bY");
BOOST_CHECK_EQUAL(Whiskers(templ)("b", false).render(), "");
}
BOOST_AUTO_TEST_CASE(conditional_plus_params)
{
string templ = " - <?b>_<r><!b>^<t></b> - ";