Unit Tests

- Added more word-boundary tests, even though they are broken on OSX.
  I don't think there is anythign we can do about this.
This commit is contained in:
Paul Beckingham 2011-10-16 11:19:33 -04:00
parent 4f26b13d82
commit fc9f9980b8

View file

@ -87,9 +87,15 @@ int main (int argc, char** argv)
ut.ok (r9.match (start, end, text), "e there are matches");
ut.is (start.size (), (size_t) 6, "e == 6 matches");
RX r10 ("\\bthe\\b");
RX r10 ("\\bthe");
text = "this is the end.";
ut.ok (r10.match (text), text + " =~ /\\bthe\\b/");
ut.ok (r10.match (text), text + " =~ /\\bthe/");
RX r11 ("the\\b");
ut.ok (r11.match (text), text + " =~ /the\\b/");
RX r12 ("\\bthe\\b");
ut.ok (r12.match (text), text + " =~ /\\bthe\\b/");
return 0;
}