bindings: glib: tests: fix version regex
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 22 Oct 2024 08:56:02 +0000 (10:56 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 22 Oct 2024 08:56:02 +0000 (10:56 +0200)
Bring the version matching regex pattern in line with the others in the
tree so that it can also match a string without -rcX or -devel suffix.

Fixes: e090088c21b7 ("bindings: add GLib bindings")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
bindings/glib/tests/tests-misc.c

index a19a20e1df17bdd02d84a6dccdeacb9834ff0d91..356e408ec4c2240bb2211d2a064f85794da625fa 100644 (file)
@@ -56,7 +56,7 @@ GPIOD_TEST_CASE(is_gpiochip_link_good)
 
 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;