aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2010-02-08 11:45:50 -0800
committerDan Williams <dcbw@redhat.com>2010-02-08 11:45:50 -0800
commit7fdacfc89bb233ee0018a9ae64ce1ffa5a23f5d3 (patch)
tree85b58c6ee642fb9dc24009dfabc05ec3da5d9ee6 /src/tests
parent9eb376d782e1f40d430807794c5b0f60a91e058b (diff)
test: add SE K600i COPS response testcase
Diffstat (limited to 'src/tests')
-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));