This time we missed the fact that the last part is optional. Fix it
treewide.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
SECTION("check api_version() format")
{
REQUIRE_THAT(::gpiod::api_version(),
- regex_matcher("^\\d+\\.\\d+(\\.\\d+|\\-devel|\\-rc\\d+)$"));
+ regex_matcher("^\\d+\\.\\d+(\\.\\d+|\\-devel|\\-rc\\d+)?$"));
}
}
class VersionString(TestCase):
- VERSION_PATTERN = "^\\d+\\.\\d+(\\.\\d+|\\-devel|\\-rc\\d+)$"
+ VERSION_PATTERN = "^\\d+\\.\\d+(\\.\\d+|\\-devel|\\-rc\\d+)?$"
def test_api_version_string(self):
self.assertRegex(gpiod.api_version, VersionString.VERSION_PATTERN)
GPIOD_TEST_CASE(version_string)
{
- static const gchar *const pattern = "^\\d+\\.\\d+(\\.\\d+|\\-devel|\\-rc\\d+)$";
+ static const gchar *const pattern = "^\\d+\\.\\d+(\\.\\d+|\\-devel|\\-rc\\d+)?$";
g_autoptr(GError) err = NULL;
g_autoptr(GRegex) regex = NULL;