Commit c3d39b62 authored by JINMEI Tatuya's avatar JINMEI Tatuya

[2373] additional test for escaped str: check escaped \ doesn't confuse lexer.

parent ac107fab
......@@ -353,6 +353,11 @@ TEST_F(MasterLexerStateTest, stringEscape) {
EXPECT_EQ(&s_string, State::start(lexer, common_options));
EXPECT_EQ(s_null, s_string.handle(lexer)); // recognize str, see ' ' in mid
stringTokenCheck("escaped\\\\", s_string.getToken(lexer));
// Confirm the word that follows the escaped '\' is correctly recognized.
EXPECT_EQ(&s_string, State::start(lexer, common_options));
EXPECT_EQ(s_null, s_string.handle(lexer)); // recognize str, see ' ' at end
stringTokenCheck("backslash", s_string.getToken(lexer));
}
TEST_F(MasterLexerStateTest, quotedString) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment