| 69 | } |
| 70 | |
| 71 | std::string catch_path(std::string path) { |
| 72 | auto start = path.find("catch"); |
| 73 | // try capitalized instead |
| 74 | if (start == std::string::npos) { |
| 75 | start = path.find("Catch"); |
| 76 | } |
| 77 | if (start == std::string::npos) { |
| 78 | throw std::domain_error("Couldn't find Catch's base path"); |
| 79 | } |
| 80 | auto end = path.find_first_of("\\/", start); |
| 81 | return path.substr(0, end); |
| 82 | } |
| 83 | |
| 84 | std::string windowsify_path(std::string path) { |
| 85 | for (auto& c : path) { |