Add unit tests for escape sequences

refs #8164
This commit is contained in:
Gunnar Beutner 2015-01-07 13:26:10 +01:00
parent f3e0c5f113
commit 25d639d702
1 changed files with 8 additions and 0 deletions

View File

@ -195,6 +195,14 @@ BOOST_AUTO_TEST_CASE(simple)
expr = ConfigCompiler::CompileText("<test>", "\"test\" + 3");
BOOST_CHECK(expr->Evaluate(frame) == "test3");
delete expr;
expr = ConfigCompiler::CompileText("<test>", "\"\\\"te\\\\st\"");
BOOST_CHECK(expr->Evaluate(frame) == "\"te\\st");
delete expr;
expr = ConfigCompiler::CompileText("<test>", "\"\\'test\"");
BOOST_CHECK_THROW(expr->Evaluate(frame) == "\"test", ScriptError);
delete expr;
}
BOOST_AUTO_TEST_CASE(advanced)