Test: Added failing quoted string test

This commit is contained in:
Paul Beckingham 2015-07-11 10:50:55 -04:00
parent daba36860b
commit e99dec6e1b

View file

@ -37,7 +37,7 @@ Context context;
////////////////////////////////////////////////////////////////////////////////
int main (int argc, char** argv)
{
UnitTest t (1087);
UnitTest t (1088);
std::vector <std::pair <std::string, Lexer::Type>> tokens;
std::string token;
@ -218,6 +218,9 @@ int main (int argc, char** argv)
t.is (word, "'one two'", " word '" + word + "'");
t.is ((int)cursor, 9, " cursor");
cursor = 0;
t.ok (Lexer::readWord ("'one", "'\"", cursor, word), "readWord ''one' --> false");
// static bool readWord (const std::string&, std::string::size_type&, std::string&);
cursor = 0;
t.ok (Lexer::readWord ("input", cursor, word), "readWord 'input' --> true");