From cb366e027062eb27123efc513a85e77fb1831472 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 13 Aug 2011 21:09:57 -0400 Subject: [PATCH] Unit Tests - rx.t - Added a \b word-boundary unit test that isn't working. Documentation says it does. Computer says no. --- cmake.h.in | 1 + test/rx.t.cpp | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake.h.in b/cmake.h.in index a6d55731d..61a878bca 100644 --- a/cmake.h.in +++ b/cmake.h.in @@ -57,5 +57,6 @@ Override PACKAGE_LANGUAGE, then #cmakedefine HAVE_UUID #cmakedefine HAVE_UUID_UNPARSE_LOWER +/* Undefine this to eliminate the execute command */ #define HAVE_EXECUTE 1 diff --git a/test/rx.t.cpp b/test/rx.t.cpp index 703ee0fb5..0ed5969e5 100644 --- a/test/rx.t.cpp +++ b/test/rx.t.cpp @@ -32,7 +32,7 @@ Context context; int main (int argc, char** argv) { - UnitTest ut (15); + UnitTest ut (16); 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 (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; }