diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-05-08 18:16:09 +0100 | 
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-06-09 21:07:55 +0100 | 
| commit | d68c427a0b7d8f120d621efd3e44958e36699a7f (patch) | |
| tree | ea3dfcbda80b32172bb64e9b7d3e8caaaf58de3b | |
| parent | Adjust wrap of plain text content to recommended width (diff) | |
| download | gentoobrowse-api-d68c427a0b7d8f120d621efd3e44958e36699a7f.tar.bz2 gentoobrowse-api-d68c427a0b7d8f120d621efd3e44958e36699a7f.tar.xz gentoobrowse-api-d68c427a0b7d8f120d621efd3e44958e36699a7f.zip  | |
Regex for expected as it might be caught up a wrapped line
| -rw-r--r-- | gentoobrowse-api/unittests/testNotifications.cpp | 4 | 
1 files changed, 3 insertions, 1 deletions
diff --git a/gentoobrowse-api/unittests/testNotifications.cpp b/gentoobrowse-api/unittests/testNotifications.cpp index 700b3a6..2783eb8 100644 --- a/gentoobrowse-api/unittests/testNotifications.cpp +++ b/gentoobrowse-api/unittests/testNotifications.cpp @@ -4,6 +4,7 @@  #include "mockDefs.h"  #include <definedDirs.h>  #include <fstream> +#include <regex>  #include <tidy.h>  using namespace std::string_literals; @@ -71,7 +72,8 @@ BOOST_AUTO_TEST_CASE( testSignup )  	for (auto p : e->body) {  		BOOST_REQUIRE(p->payload.find("Welcome to Gentoo Browse") != std::string::npos);  		BOOST_REQUIRE(p->payload.find("https://gentoobrowse.randomdan.homeip.net/user/verification/some-guid/testuser") != std::string::npos); -		BOOST_REQUIRE(p->payload.find("confirmation page: some-guid") != std::string::npos); +		BOOST_REQUIRE(std::regex_search(p->payload, +					std::regex("confirmation\\s+page:\\s+some-guid")));  	}  }  | 
