We need to match release candidate versions too.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
SECTION("check api_version() format")
{
REQUIRE_THAT(::gpiod::api_version(),
- regex_matcher("^[0-9][1-9]?\\.[0-9][1-9]?([\\.0-9]?|\\-devel)$"));
+ regex_matcher("^[0-9][1-9]?\\.[0-9][1-9]?([\\.0-9]?|\\-devel|\\-rc[0-9])$"));
}
}
class VersionString(TestCase):
- VERSION_PATTERN = "^[0-9][1-9]?\\.[0-9][1-9]?(\\.[0-9]?|\\-devel)$"
+ VERSION_PATTERN = "^[0-9][1-9]?\\.[0-9][1-9]?(\\.[0-9]?|\\-devel|\\-rc[0-9])$"
def test_api_version_string(self):
self.assertRegex(gpiod.api_version, VersionString.VERSION_PATTERN)
GPIOD_TEST_CASE(version_string)
{
- static const gchar *const pattern = "^[0-9][1-9]?\\.[0-9][1-9]?([\\.0-9]?|\\-devel)$";
+ static const gchar *const pattern = "^[0-9][1-9]?\\.[0-9][1-9]?([\\.0-9]?|\\-devel|\\-rc[0-9])$";
g_autoptr(GError) err = NULL;
g_autoptr(GRegex) regex = NULL;