mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add whiskers test for weird case
This commit is contained in:
parent
05496064fe
commit
cae1571aa7
@ -85,6 +85,13 @@ BOOST_AUTO_TEST_CASE(conditional_with_else)
|
|||||||
BOOST_CHECK_EQUAL(Whiskers(templ)("b", false).render(), "Y");
|
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)
|
BOOST_AUTO_TEST_CASE(conditional_plus_params)
|
||||||
{
|
{
|
||||||
string templ = " - <?b>_<r><!b>^<t></b> - ";
|
string templ = " - <?b>_<r><!b>^<t></b> - ";
|
||||||
|
Loading…
Reference in New Issue
Block a user