diff options
author | Aleksander Morgado <aleksandermj@chromium.org> | 2022-09-02 17:13:29 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksandermj@chromium.org> | 2022-09-02 17:23:56 +0200 |
commit | 51a333cd9a6707de7c623fd4c94cb6032477572f (patch) | |
tree | d433473025e734ef3a01333c659b4ce0f974161f | |
parent | 79a5a4eed2189ea87d25cbe00bc824a2572cad66 (diff) |
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
-rw-r--r-- | src/tests/test-modem-helpers.c | 10 |
1 files changed, 5 insertions, 5 deletions
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)); } |