diff options
author | Dan Williams <dcbw@redhat.com> | 2010-01-05 21:54:05 -0600 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2010-01-05 21:54:05 -0600 |
commit | d3b5688d4374a9ca39a11453a7b2d143274b2725 (patch) | |
tree | 02dff865e717bddb62cec2e964bc86a5c054f2eb | |
parent | 008c7e322d91ebe7995b57e77ac48162655556e1 (diff) |
test: add Nokia 2720 COPS response testcase
-rw-r--r-- | src/tests/test-modem-helpers.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tests/test-modem-helpers.c b/src/tests/test-modem-helpers.c index 912bcf3d..921a698a 100644 --- a/src/tests/test-modem-helpers.c +++ b/src/tests/test-modem-helpers.c @@ -384,6 +384,18 @@ test_cops_response_gtultraexpress (void *f, gpointer d) } static void +test_cops_response_n2720 (void *f, gpointer d) +{ + const char *reply = "+COPS: (2,\"T - Mobile\",,\"31026\",0),\r\n(1,\"AT&T\",,\"310410\",0),,(0,1,3),(0,2)"; + static OperEntry expected[] = { + { "2", "T - Mobile", NULL, "31026", "0" }, + { "1", "AT&T", NULL, "310410", "0" }, + }; + + test_results ("Nokia 2720", reply, &expected[0], ARRAY_LEN (expected)); +} + +static void test_cops_response_gsm_invalid (void *f, gpointer d) { const char *reply = "+COPS: (0,1,2,3),(1,2,3,4)"; @@ -443,6 +455,7 @@ int main (int argc, char **argv) g_test_suite_add (suite, TESTCASE (test_cops_response_e226, NULL)); g_test_suite_add (suite, TESTCASE (test_cops_response_xu870, NULL)); g_test_suite_add (suite, TESTCASE (test_cops_response_gtultraexpress, NULL)); + g_test_suite_add (suite, TESTCASE (test_cops_response_n2720, NULL)); g_test_suite_add (suite, TESTCASE (test_cops_response_gsm_invalid, NULL)); g_test_suite_add (suite, TESTCASE (test_cops_response_umts_invalid, NULL)); |