diff options
author | Thomas Sailer <t.sailer@alumni.ethz.ch> | 2016-02-11 13:45:09 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2016-02-11 15:34:25 +0100 |
commit | 4442173dcff34fb6f2ce0d07b10c95a06a31a8f5 (patch) | |
tree | c1e1bfb94fad40bcd800fce4769798577b44f100 /src/tests/test-modem-helpers.c | |
parent | 18c8dd60a7ffec58fc1846f0a3894c951018e260 (diff) |
modem-helpers: allow optional whitespace in +CGDCONT response
Add testcase for Thuraya XT.
Signed-off-by: Thomas Sailer <t.sailer@alumni.ethz.ch>
Diffstat (limited to 'src/tests/test-modem-helpers.c')
-rw-r--r-- | src/tests/test-modem-helpers.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tests/test-modem-helpers.c b/src/tests/test-modem-helpers.c index bd7f6889..82479ac5 100644 --- a/src/tests/test-modem-helpers.c +++ b/src/tests/test-modem-helpers.c @@ -1798,6 +1798,19 @@ test_cgdcont_test_response_single_context (void *f, gpointer d) test_cgdcont_test_results ("Single Context", reply, &expected[0], G_N_ELEMENTS (expected)); } +static void +test_cgdcont_test_response_thuraya (void *f, gpointer d) +{ + const gchar *reply = + "+CGDCONT: ( 1 ) , \"IP\" ,,, (0-2),(0-3)\r\n" + "+CGDCONT: , \"PPP\" ,,, (0-2),(0-3)\r\n"; + static MM3gppPdpContextFormat expected[] = { + { 1, 1, MM_BEARER_IP_FAMILY_IPV4 } + }; + + test_cgdcont_test_results ("Thuraya", reply, &expected[0], G_N_ELEMENTS (expected)); +} + /*****************************************************************************/ /* Test CGDCONT read responses */ @@ -2739,6 +2752,7 @@ int main (int argc, char **argv) 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_test_response_thuraya, 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)); |