diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2013-11-01 15:44:18 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2013-11-01 15:50:12 +0100 |
commit | 1b3114a0f9ca28273e1446535b73d5b83c54c6cf (patch) | |
tree | 65de3b859136c0ec27f3ff0501665aac6e025053 /src/tests | |
parent | 04b52d590f9c47316e8eca9eeccb8084991f2f55 (diff) |
modem-helpers: handle +CGDCONT=? replies with single context
https://bugzilla.gnome.org/show_bug.cgi?id=708983
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/test-modem-helpers.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/tests/test-modem-helpers.c b/src/tests/test-modem-helpers.c index 69987872..b4ff8a2b 100644 --- a/src/tests/test-modem-helpers.c +++ b/src/tests/test-modem-helpers.c @@ -1707,6 +1707,20 @@ test_cgdcont_test_response_multiple_and_ignore (void *f, gpointer d) test_cgdcont_test_results ("Multiple and Ignore", reply, &expected[0], G_N_ELEMENTS (expected)); } +static void +test_cgdcont_test_response_single_context (void *f, gpointer d) +{ + const gchar *reply = + "+CGDCONT: (1),\"IP\",,,(0),(0)\r\n" + "+CGDCONT: (1),\"IPV6\",,,(0),(0)\r\n"; + static MM3gppPdpContextFormat expected[] = { + { 1, 1, MM_BEARER_IP_FAMILY_IPV4 }, + { 1, 1, MM_BEARER_IP_FAMILY_IPV6 } + }; + + test_cgdcont_test_results ("Single Context", reply, &expected[0], G_N_ELEMENTS (expected)); +} + /*****************************************************************************/ /* Test CGDCONT read responses */ @@ -2443,6 +2457,7 @@ int main (int argc, char **argv) g_test_suite_add (suite, TESTCASE (test_cgdcont_test_response_single, NULL)); g_test_suite_add (suite, TESTCASE (test_cgdcont_test_response_multiple, NULL)); g_test_suite_add (suite, TESTCASE (test_cgdcont_test_response_multiple_and_ignore, NULL)); + g_test_suite_add (suite, TESTCASE (test_cgdcont_test_response_single_context, NULL)); g_test_suite_add (suite, TESTCASE (test_cgdcont_read_response_nokia, NULL)); g_test_suite_add (suite, TESTCASE (test_cgdcont_read_response_samsung, NULL)); |