diff options
author | Dan Williams <dcbw@redhat.com> | 2010-03-10 14:50:41 -0800 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2010-03-10 14:50:41 -0800 |
commit | 1979512d8dfb6428353e6bf358f908973a318095 (patch) | |
tree | 60f703f4a2c75c4e3a2d7d362969fd2c441ddb8c /src/tests/test-modem-helpers.c | |
parent | 8dde6bb8dd2c063f5740ae78b980343be8e5d669 (diff) | |
parent | b7858ba235c046a514fbc79e18ac9faa75982032 (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.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/tests/test-modem-helpers.c b/src/tests/test-modem-helpers.c index 980c4ae7..addeee3e 100644 --- a/src/tests/test-modem-helpers.c +++ b/src/tests/test-modem-helpers.c @@ -670,6 +670,25 @@ test_cgreg2_f3607gw_unsolicited (void *f, gpointer d) test_creg_match ("Ericsson F3607gw CGREG=2", FALSE, reply, data, &result); } +static void +test_creg_cgreg_multi_unsolicited (void *f, gpointer d) +{ + TestData *data = (TestData *) d; + const char *reply = "\r\n+CREG: 5\r\n\r\n+CGREG: 0\r\n"; + const CregResult result = { 5, 0, 0, -1, 1, FALSE}; + + test_creg_match ("Multi CREG/CGREG", FALSE, reply, data, &result); +} + +static void +test_creg_cgreg_multi2_unsolicited (void *f, gpointer d) +{ + TestData *data = (TestData *) d; + const char *reply = "\r\n+CGREG: 0\r\n\r\n+CREG: 5\r\n"; + const CregResult result = { 0, 0, 0, -1, 1, TRUE}; + + test_creg_match ("Multi CREG/CGREG #2", FALSE, reply, data, &result); +} static TestData * test_data_new (void) @@ -753,6 +772,9 @@ int main (int argc, char **argv) g_test_suite_add (suite, TESTCASE (test_cgreg2_f3607gw_solicited, data)); g_test_suite_add (suite, TESTCASE (test_cgreg2_f3607gw_unsolicited, data)); + g_test_suite_add (suite, TESTCASE (test_creg_cgreg_multi_unsolicited, data)); + g_test_suite_add (suite, TESTCASE (test_creg_cgreg_multi2_unsolicited, data)); + result = g_test_run (); test_data_free (data); |