Commit 522f3f2b authored by Jelte Jansen's avatar Jelte Jansen
Browse files

[2374] Add one more test to numbers-that-are-strings

parent c6ceedc0
......@@ -526,6 +526,8 @@ TEST_F(MasterLexerStateTest, stringNumbers) {
// as strings (unsigned integers only)
ss << "123abc456 "; // 'Numbers' containing non-digits should
// be interpreted as strings
ss << "123\\456 "; // Numbers containing escaped digits are
// interpreted as strings
ss << "3scaped\\ space ";
ss << "3scaped\\\ttab ";
ss << "3scaped\\(paren ";
......@@ -544,6 +546,10 @@ TEST_F(MasterLexerStateTest, stringNumbers) {
EXPECT_EQ(s_null, s_number.handle(lexer));
stringTokenCheck("123abc456", s_number.getToken(lexer), false);
EXPECT_EQ(&s_number, State::start(lexer, common_options));
EXPECT_EQ(s_null, s_number.handle(lexer));
stringTokenCheck("123\\456", s_number.getToken(lexer), false);
EXPECT_EQ(&s_number, State::start(lexer, common_options));
EXPECT_EQ(s_null, s_number.handle(lexer)); // recognize str, see ' ' at end
stringTokenCheck("3scaped\\ space", s_number.getToken(lexer));
......
Supports Markdown
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