Fix osx version test (#3308)

This commit is contained in:
Hind-M 2024-06-07 10:27:55 +02:00 committed by GitHub
parent 45e4b7c8ba
commit 56c0a8397c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -22,7 +22,10 @@ TEST_SUITE("util::os_osx")
if (util::on_mac)
{
REQUIRE(maybe_version.has_value());
static const auto version_regex = std::regex(R"r(\d+\.\d+\.\d+)r");
// The version would be a sequence:
// 'x.x' or 'x.x.x'
// with 'x' matching one or more digits
static const auto version_regex = std::regex(R"r(\d+\.\d+(\.\d+)?)r");
CHECK(std ::regex_match(maybe_version.value(), version_regex));
}
else