mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Regexes
- Added support for \< and \> for Solaris (thanks to Owen Clarke).
This commit is contained in:
parent
f173469f98
commit
52f70f6901
2 changed files with 21 additions and 0 deletions
|
@ -93,6 +93,17 @@ int main (int argc, char** argv)
|
|||
ut.pass (text + " =~ /\\bthe/");
|
||||
ut.pass (text + " =~ /the\\b/");
|
||||
ut.pass (text + " =~ /\\bthe\\b/");
|
||||
#else
|
||||
#ifdef SOLARIS
|
||||
RX r10 ("\\<the");
|
||||
text = "this is the end.";
|
||||
ut.ok (r10.match (text), text + " =~ /\\<the/");
|
||||
|
||||
RX r11 ("the\\>");
|
||||
ut.ok (r11.match (text), text + " =~ /the\\>/");
|
||||
|
||||
RX r12 ("\\<the\\>");
|
||||
ut.ok (r12.match (text), text + " =~ /\\<the\\>/");
|
||||
#else
|
||||
RX r10 ("\\bthe");
|
||||
text = "this is the end.";
|
||||
|
@ -103,6 +114,7 @@ int main (int argc, char** argv)
|
|||
|
||||
RX r12 ("\\bthe\\b");
|
||||
ut.ok (r12.match (text), text + " =~ /\\bthe\\b/");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue