mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-19 09:53:08 +02:00
Tests: Added test for Lexer::Type::set
This commit is contained in:
parent
f4a7c50f1a
commit
b2803bddda
1 changed files with 8 additions and 1 deletions
|
@ -36,7 +36,7 @@ Context context;
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int main (int argc, char** argv)
|
int main (int argc, char** argv)
|
||||||
{
|
{
|
||||||
UnitTest t (789);
|
UnitTest t (819);
|
||||||
|
|
||||||
std::vector <std::pair <std::string, Lexer::Type>> tokens;
|
std::vector <std::pair <std::string, Lexer::Type>> tokens;
|
||||||
std::string token;
|
std::string token;
|
||||||
|
@ -275,6 +275,13 @@ int main (int argc, char** argv)
|
||||||
{ "1.2e-3.4", { { "1.2e-3.4", Lexer::Type::number }, NO, NO, NO, NO }, },
|
{ "1.2e-3.4", { { "1.2e-3.4", Lexer::Type::number }, NO, NO, NO, NO }, },
|
||||||
{ "0x2f", { { "0x2f", Lexer::Type::hex }, NO, NO, NO, NO }, },
|
{ "0x2f", { { "0x2f", Lexer::Type::hex }, NO, NO, NO, NO }, },
|
||||||
|
|
||||||
|
// Set (1,2,4-7,9)
|
||||||
|
{ "1,2", { { "1,2", Lexer::Type::set }, NO, NO, NO, NO }, },
|
||||||
|
{ "1-2", { { "1-2", Lexer::Type::set }, NO, NO, NO, NO }, },
|
||||||
|
{ "1-2,4", { { "1-2,4", Lexer::Type::set }, NO, NO, NO, NO }, },
|
||||||
|
{ "1-2,4,6-8", { { "1-2,4,6-8", Lexer::Type::set }, NO, NO, NO, NO }, },
|
||||||
|
{ "1-2,4,6-8,10-12", { { "1-2,4,6-8,10-12", Lexer::Type::set }, NO, NO, NO, NO }, },
|
||||||
|
|
||||||
// Pair
|
// Pair
|
||||||
{ "name:value", { { "name:value", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
{ "name:value", { { "name:value", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
||||||
{ "desc.cont:pattern", { { "desc.cont:pattern", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
{ "desc.cont:pattern", { { "desc.cont:pattern", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue