summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2012-10-18 11:57:58 -0500
committerDenis Kenzior <denkenz@gmail.com>2012-10-18 11:57:58 -0500
commit193619036aa8dba72402cf2428bf3ee496e85e60 (patch)
treee8c1e5fc56cb5abf5d6a76c6b79cfb2ae1609d94 /tools
parenta13ac83b6b1d4e1d683854dc0ddbf0e84489f115 (diff)
downloadofono-193619036aa8dba72402cf2428bf3ee496e85e60.tar.bz2
stktest: Add GetInput test sequence 1.2
Diffstat (limited to 'tools')
-rw-r--r--tools/stktest.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/stktest.c b/tools/stktest.c
index c32ecab6..905aed6a 100644
--- a/tools/stktest.c
+++ b/tools/stktest.c
@@ -2190,6 +2190,30 @@ static DBusMessage *test_get_input_11(DBusMessage *msg,
return reply;
}
+static DBusMessage *test_get_input_12(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 *ret = "67*#+";
+
+ STKTEST_AGENT_ASSERT(g_str_equal(alpha, "Enter 67*#+"));
+ STKTEST_AGENT_ASSERT(icon_id == 0);
+ STKTEST_AGENT_ASSERT(g_str_equal(def_input, ""));
+ STKTEST_AGENT_ASSERT(min == 5);
+ STKTEST_AGENT_ASSERT(max == 5);
+ 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();
@@ -2640,6 +2664,12 @@ static void __stktest_test_init(void)
sizeof(get_input_response_111),
test_get_input_11,
expect_response_and_finish);
+ stktest_add_test("Get Input 1.2", "RequestDigits",
+ get_input_121, sizeof(get_input_121),
+ get_input_response_121,
+ sizeof(get_input_response_121),
+ test_get_input_12,
+ expect_response_and_finish);
}
static void test_destroy(gpointer user_data)