mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Unit Tests - rx.t
- Added a \b word-boundary unit test that isn't working. Documentation says it does. Computer says no.
This commit is contained in:
parent
bfad448f82
commit
cb366e0270
2 changed files with 6 additions and 1 deletions
|
@ -57,5 +57,6 @@ Override PACKAGE_LANGUAGE, then
|
||||||
#cmakedefine HAVE_UUID
|
#cmakedefine HAVE_UUID
|
||||||
#cmakedefine HAVE_UUID_UNPARSE_LOWER
|
#cmakedefine HAVE_UUID_UNPARSE_LOWER
|
||||||
|
|
||||||
|
/* Undefine this to eliminate the execute command */
|
||||||
#define HAVE_EXECUTE 1
|
#define HAVE_EXECUTE 1
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ Context context;
|
||||||
|
|
||||||
int main (int argc, char** argv)
|
int main (int argc, char** argv)
|
||||||
{
|
{
|
||||||
UnitTest ut (15);
|
UnitTest ut (16);
|
||||||
|
|
||||||
std::string text = "This is a test.";
|
std::string text = "This is a test.";
|
||||||
|
|
||||||
|
@ -76,6 +76,10 @@ int main (int argc, char** argv)
|
||||||
ut.is (start[0], 11, "(e..)[0] == 11->");
|
ut.is (start[0], 11, "(e..)[0] == 11->");
|
||||||
ut.is (end[0], 14, "(e..)[0] == ->14");
|
ut.is (end[0], 14, "(e..)[0] == ->14");
|
||||||
|
|
||||||
|
RX r9 ("\\bthe\\b");
|
||||||
|
text = "this is the end.";
|
||||||
|
ut.ok (r9.match (text), text + " =~ /\\bthe\\b/");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue