diff options
author | Denis Kenzior <denkenz@gmail.com> | 2012-10-18 12:54:38 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2012-10-18 12:54:38 -0500 |
commit | 86021cb568cc3b960f9010a8077ed818bf51ddad (patch) | |
tree | 808e4d6507f1f062d23232f585bbe066f060632c /tools | |
parent | 19a86cf7a88a276468e69b1db3d3e05ba4ea0a40 (diff) | |
download | ofono-86021cb568cc3b960f9010a8077ed818bf51ddad.tar.bz2 |
stktest: Add GetInput test sequence 1.8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/stktest.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/tools/stktest.c b/tools/stktest.c index 93a1eee8..d8a61ace 100644 --- a/tools/stktest.c +++ b/tools/stktest.c @@ -2326,6 +2326,38 @@ static DBusMessage *test_get_input_17(DBusMessage *msg, return stktest_error_end_session(msg); } +static DBusMessage *test_get_input_18(DBusMessage *msg, + const char *alpha, + unsigned char icon_id, + const char *def_input, + unsigned char min, unsigned char max, + gboolean hide_typing) +{ + DBusMessage *reply; + const char *expect = + "***1111111111###***2222222222###***3333333333###***4444444444###***" + "5555555555###***6666666666###***7777777777###***8888888888###***9999" + "999999###***0000000000###"; + const char *ret = "***1111111111###***2222222222###***" + "3333333333###***4444444444###" + "***5555555555###***6666666666###" + "***7777777777###***8888888888###" + "***9999999999###***0000000000###"; + + STKTEST_AGENT_ASSERT(g_str_equal(alpha, expect)); + STKTEST_AGENT_ASSERT(icon_id == 0); + STKTEST_AGENT_ASSERT(g_str_equal(def_input, "")); + STKTEST_AGENT_ASSERT(min == 160); + STKTEST_AGENT_ASSERT(max == 160); + STKTEST_AGENT_ASSERT(hide_typing == FALSE); + + reply = dbus_message_new_method_return(msg); + dbus_message_append_args(reply, DBUS_TYPE_STRING, &ret, + DBUS_TYPE_INVALID); + + return reply; +} + static void power_down_reply(DBusPendingCall *call, void *user_data) { __stktest_test_next(); @@ -2812,6 +2844,12 @@ static void __stktest_test_init(void) sizeof(get_input_response_171), test_get_input_17, expect_response_and_finish); + stktest_add_test("Get Input 1.8", "RequestDigits", + get_input_181, sizeof(get_input_181), + get_input_response_181, + sizeof(get_input_response_181), + test_get_input_18, + expect_response_and_finish); } static void test_destroy(gpointer user_data) |