Enhancements - i18n & Subst

- Created initial, empty strings files.
- Converted Subst to use Nibbler.
This commit is contained in:
Paul Beckingham 2009-06-01 00:15:08 -04:00
parent 7248267a72
commit 75c220c352
6 changed files with 70 additions and 29 deletions

View file

@ -31,7 +31,7 @@
////////////////////////////////////////////////////////////////////////////////
int main (int argc, char** argv)
{
UnitTest t (2);
UnitTest t (3);
T2 task;
task.set ("description", "one two three four");
@ -65,6 +65,20 @@ int main (int argc, char** argv)
t.fail ("failed to parse '/e /E /g'");
}
if (s.parse ("/from/to/g"))
{
std::string description = task.get ("description");
std::vector <Att> annotations;
task.getAnnotations (annotations);
s.apply (description, annotations);
t.is (description, "one two three four", "multiple word subst mismatch");
}
else
{
t.fail ("failed to parse '/from/to/g'");
}
return 0;
}