From 25d639d702ce6fcb4952fd403f4bb0e2ddff9c65 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 7 Jan 2015 13:26:10 +0100 Subject: [PATCH] Add unit tests for escape sequences refs #8164 --- test/config-ops.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/config-ops.cpp b/test/config-ops.cpp index 1bb89a3dd..b5cf529aa 100644 --- a/test/config-ops.cpp +++ b/test/config-ops.cpp @@ -195,6 +195,14 @@ BOOST_AUTO_TEST_CASE(simple) expr = ConfigCompiler::CompileText("", "\"test\" + 3"); BOOST_CHECK(expr->Evaluate(frame) == "test3"); delete expr; + + expr = ConfigCompiler::CompileText("", "\"\\\"te\\\\st\""); + BOOST_CHECK(expr->Evaluate(frame) == "\"te\\st"); + delete expr; + + expr = ConfigCompiler::CompileText("", "\"\\'test\""); + BOOST_CHECK_THROW(expr->Evaluate(frame) == "\"test", ScriptError); + delete expr; } BOOST_AUTO_TEST_CASE(advanced)