Skip to content

Commit 48669b4

Browse files
authored
Merge pull request #13219 from ethereum/whiskers
Add whiskers test for weird case
2 parents 4e72127 + cae1571 commit 48669b4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/libsolutil/Whiskers.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ BOOST_AUTO_TEST_CASE(conditional_with_else)
8585
BOOST_CHECK_EQUAL(Whiskers(templ)("b", false).render(), "Y");
8686
}
8787

88+
BOOST_AUTO_TEST_CASE(broken_conditional_with_else)
89+
{
90+
string templ = "<?b>X<!bY</b>";
91+
BOOST_CHECK_EQUAL(Whiskers(templ)("b", true).render(), "X<!bY");
92+
BOOST_CHECK_EQUAL(Whiskers(templ)("b", false).render(), "");
93+
}
94+
8895
BOOST_AUTO_TEST_CASE(conditional_plus_params)
8996
{
9097
string templ = " - <?b>_<r><!b>^<t></b> - ";

0 commit comments

Comments
 (0)