diff options
Diffstat (limited to 'atf-c++/detail/test_helpers.cpp')
| -rw-r--r-- | atf-c++/detail/test_helpers.cpp | 41 | 
1 files changed, 0 insertions, 41 deletions
diff --git a/atf-c++/detail/test_helpers.cpp b/atf-c++/detail/test_helpers.cpp index 42bd711dc7d6..191649d03d59 100644 --- a/atf-c++/detail/test_helpers.cpp +++ b/atf-c++/detail/test_helpers.cpp @@ -27,10 +27,6 @@  // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  // -extern "C" { -#include <regex.h> -} -  #include <fstream>  #include <iostream>  #include <string> @@ -88,43 +84,6 @@ get_process_helpers_path(const atf::tests::tc& tc)             ".." / "atf-c" / "detail" / "process_helpers";  } -bool -grep_file(const char* name, const char* regex) -{ -    std::ifstream is(name); -    ATF_REQUIRE(is); - -    bool found = false; - -    std::string line; -    std::getline(is, line); -    while (!found && is.good()) { -        if (grep_string(line, regex)) -            found = true; -        else -            std::getline(is, line); -    } - -    return found; -} - -bool -grep_string(const std::string& str, const char* regex) -{ -    int res; -    regex_t preg; - -    std::cout << "Looking for '" << regex << "' in '" << str << "'\n"; -    ATF_REQUIRE(::regcomp(&preg, regex, REG_EXTENDED) == 0); - -    res = ::regexec(&preg, str.c_str(), 0, NULL, 0); -    ATF_REQUIRE(res == 0 || res == REG_NOMATCH); - -    ::regfree(&preg); - -    return res == 0; -} -  void  test_helpers_detail::check_equal(const char* expected[],                                   const string_vector& actual)  | 
