On Windows the Regex matcher for '.' does not match '\n'

Thus we have to use ContainsRegex instead of MatchesRegex
This commit is contained in:
Axel Kohlmeyer
2022-01-29 16:35:30 -05:00
parent d62e25decc
commit 845ab2dd71
13 changed files with 52 additions and 57 deletions

View File

@ -45,7 +45,7 @@ using LAMMPS_NS::utils::split_words;
namespace LAMMPS_NS {
using ::testing::Eq;
using ::testing::HasSubstr;
using ::testing::MatchesRegex;
using ::testing::ContainsRegex;
using ::testing::StrEq;
class PythonPackageTest : public LAMMPSTest {
@ -238,7 +238,7 @@ TEST_F(PythonPackageTest, python_variable)
std::string output = CAPTURE_OUTPUT([&] {
command("print \"${sq}\"");
});
ASSERT_THAT(output, MatchesRegex("print.*2.25.*"));
ASSERT_THAT(output, ContainsRegex("print.*2.25.*"));
}
TEST_F(PythonPackageTest, InlineFunction)