mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-02 23:48:35 +02:00
Enhancements - i18n & Subst
- Created initial, empty strings files. - Converted Subst to use Nibbler.
This commit is contained in:
parent
7248267a72
commit
75c220c352
6 changed files with 70 additions and 29 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue