Tests: Lexer::Type::dom and Lexer::Type::path tests
This commit is contained in:
@@ -36,7 +36,7 @@ Context context;
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int main (int argc, char** argv)
|
int main (int argc, char** argv)
|
||||||
{
|
{
|
||||||
UnitTest t (280);
|
UnitTest t (304);
|
||||||
|
|
||||||
std::vector <std::pair <std::string, Lexer::Type> > tokens;
|
std::vector <std::pair <std::string, Lexer::Type> > tokens;
|
||||||
std::string token;
|
std::string token;
|
||||||
@@ -415,6 +415,10 @@ int main (int argc, char** argv)
|
|||||||
{ "/from/to/", { { "/from/to/", Lexer::Type::substitution }, NOPE, NOPE }, },
|
{ "/from/to/", { { "/from/to/", Lexer::Type::substitution }, NOPE, NOPE }, },
|
||||||
{ "+tag", { { "+tag", Lexer::Type::tag }, NOPE, NOPE }, },
|
{ "+tag", { { "+tag", Lexer::Type::tag }, NOPE, NOPE }, },
|
||||||
{ "-tag", { { "-tag", Lexer::Type::tag }, NOPE, NOPE }, },
|
{ "-tag", { { "-tag", Lexer::Type::tag }, NOPE, NOPE }, },
|
||||||
|
{ "foo", { { "foo", Lexer::Type::dom }, NOPE, NOPE }, },
|
||||||
|
{ "/long/path/to/file.txt", { { "/long/path/to/file.txt", Lexer::Type::path }, NOPE, NOPE }, },
|
||||||
|
{ "Çirçös", { { "Çirçös", Lexer::Type::dom }, NOPE, NOPE }, },
|
||||||
|
{ "☺", { { "☺", Lexer::Type::dom }, NOPE, NOPE }, },
|
||||||
};
|
};
|
||||||
#define NUM_TESTS (sizeof (lexerTests) / sizeof (lexerTests[0]))
|
#define NUM_TESTS (sizeof (lexerTests) / sizeof (lexerTests[0]))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user