aboutsummaryrefslogtreecommitdiff
path: root/src/tests/test-modem-helpers.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2010-02-20 12:49:22 -0800
committerDan Williams <dcbw@redhat.com>2010-02-20 12:49:22 -0800
commit9d8e892ffe602a123697a5f65393b5752129de09 (patch)
treec317a8cd05b62ec96f2dd7e10473ce1434e01f72 /src/tests/test-modem-helpers.c
parentc916ea7b4b0bb56820a08b7d51f46f5357b27bfe (diff)
parent9185ce987d254aab07b0e8439a2788ce0670e59d (diff)
Merge remote branch 'origin/master' into qcdm
Diffstat (limited to 'src/tests/test-modem-helpers.c')
-rw-r--r--src/tests/test-modem-helpers.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/tests/test-modem-helpers.c b/src/tests/test-modem-helpers.c
index 3d93423e..f5b4b6a8 100644
--- a/src/tests/test-modem-helpers.c
+++ b/src/tests/test-modem-helpers.c
@@ -409,6 +409,27 @@ test_cops_response_gobi (void *f, gpointer d)
}
static void
+test_cops_response_sek600i (void *f, gpointer d)
+{
+ /* Phone is stupid enough to support 3G but not report cell technology,
+ * mixing together 2G and 3G cells without any way of distinguishing
+ * which is which...
+ */
+ const char *reply = "+COPS: (2,\"blau\",\"\",\"26203\"),(2,\"blau\",\"\",\"26203\"),(3,\"\",\"\",\"26201\"),(3,\"\",\"\",\"26202\"),(3,\"\",\"\",\"26207\"),(3,\"\",\"\",\"26201\"),(3,\"\",\"\",\"26207\")";
+ static OperEntry expected[] = {
+ { "2", "blau", NULL, "26203", NULL },
+ { "2", "blau", NULL, "26203", NULL },
+ { "3", NULL, NULL, "26201", NULL },
+ { "3", NULL, NULL, "26202", NULL },
+ { "3", NULL, NULL, "26207", NULL },
+ { "3", NULL, NULL, "26201", NULL },
+ { "3", NULL, NULL, "26207", NULL },
+ };
+
+ test_results ("Sony-Ericsson K600i", 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)";
@@ -470,6 +491,7 @@ int main (int argc, char **argv)
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_gobi, NULL));
+ g_test_suite_add (suite, TESTCASE (test_cops_response_sek600i, 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));