From 51a333cd9a6707de7c623fd4c94cb6032477572f Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Fri, 2 Sep 2022 17:13:29 +0200 Subject: test-modem-helpers: add EOL to strings matched with G_REGEX_NEWLINE_CRLF Looks like pcre2 (used since glib 2.73.2) requires EOLs to match if G_REGEX_NEWLINE_CRLF is explicitly used. The tests are updated accordingly, because the modem responses will anyway have the EOLs as well. See https://gitlab.gnome.org/GNOME/glib/-/issues/2729#note_1544130 Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/601 --- src/tests/test-modem-helpers.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/tests/test-modem-helpers.c b/src/tests/test-modem-helpers.c index 489cbd46..21ed2f20 100644 --- a/src/tests/test-modem-helpers.c +++ b/src/tests/test-modem-helpers.c @@ -4250,8 +4250,8 @@ typedef struct { } TestCcwa; static TestCcwa test_ccwa[] = { - { "+CCWA: 0,255", FALSE, FALSE }, /* all disabled */ - { "+CCWA: 1,255", TRUE, FALSE }, /* all enabled */ + { "+CCWA: 0,255\r\n", FALSE, FALSE }, /* all disabled */ + { "+CCWA: 1,255\r\n", TRUE, FALSE }, /* all enabled */ { "+CCWA: 0,1\r\n" "+CCWA: 0,4\r\n", FALSE, FALSE }, /* voice and fax disabled */ { "+CCWA: 1,1\r\n" @@ -4326,7 +4326,7 @@ common_test_clcc_response (const gchar *str, static void test_clcc_response_empty (void) { - const gchar *response = ""; + const gchar *response = "\r\n"; common_test_clcc_response (response, NULL, 0); } @@ -4339,7 +4339,7 @@ test_clcc_response_single (void) }; const gchar *response = - "+CLCC: 1,1,0,0,0,\"123456789\",161"; + "+CLCC: 1,1,0,0,0,\"123456789\",161\r\n"; common_test_clcc_response (response, expected_call_info_list, G_N_ELEMENTS (expected_call_info_list)); } @@ -4353,7 +4353,7 @@ test_clcc_response_single_long (void) /* NOTE: priority field is EMPTY */ const gchar *response = - "+CLCC: 1,1,4,0,0,\"123456789\",129,\"\",,0"; + "+CLCC: 1,1,4,0,0,\"123456789\",129,\"\",,0\r\n"; common_test_clcc_response (response, expected_call_info_list, G_N_ELEMENTS (expected_call_info_list)); } -- cgit v1.2.3-70-g09d2