summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2012-10-09 14:23:15 -0500
committerDenis Kenzior <denkenz@gmail.com>2012-10-09 14:23:15 -0500
commit1f732bcab3b8c2dc9e4e1379332789c4043d705e (patch)
tree23693ea53b4efe27bb83f49106abb5d1c3c43bf5 /tools
parent9ea1cc15105dabc4cc3bd231221d183c813bfa80 (diff)
downloadofono-1f732bcab3b8c2dc9e4e1379332789c4043d705e.tar.bz2
stktest: Add GetInkey test sequence 12.1-12.2
Diffstat (limited to 'tools')
-rw-r--r--tools/stktest.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/tools/stktest.c b/tools/stktest.c
index bbac64be..cd878973 100644
--- a/tools/stktest.c
+++ b/tools/stktest.c
@@ -2039,6 +2039,46 @@ static DBusMessage *test_get_inkey_111(DBusMessage *msg,
return reply;
}
+static DBusMessage *test_get_inkey_121(DBusMessage *msg,
+ const char *alpha,
+ unsigned char icon_id)
+{
+ DBusMessage *reply;
+ const char *ret = "+";
+ const char *expect = "ル";
+
+ STKTEST_AGENT_ASSERT(g_str_equal(alpha, expect));
+ STKTEST_AGENT_ASSERT(icon_id == 0);
+
+ reply = dbus_message_new_method_return(msg);
+ dbus_message_append_args(reply, DBUS_TYPE_STRING, &ret,
+ DBUS_TYPE_INVALID);
+
+ return reply;
+}
+
+static DBusMessage *test_get_inkey_122(DBusMessage *msg,
+ const char *alpha,
+ unsigned char icon_id)
+{
+ DBusMessage *reply;
+ const char *ret = "+";
+ const char *expect =
+ "ルルルルルルルルルルルルルルルルルルルル"
+ "ルルルルルルルルルルルルルルルルルルルル"
+ "ルルルルルルルルルルルルルルルルルルルル"
+ "ルルルルルルルルルル";
+
+ STKTEST_AGENT_ASSERT(g_str_equal(alpha, expect));
+ STKTEST_AGENT_ASSERT(icon_id == 0);
+
+ 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();
@@ -2465,6 +2505,18 @@ static void __stktest_test_init(void)
sizeof(get_inkey_response_1111),
test_get_inkey_111,
expect_response_and_finish);
+ stktest_add_test("Get Inkey 12.1", "RequestDigit",
+ get_inkey_1211, sizeof(get_inkey_1211),
+ get_inkey_response_1211,
+ sizeof(get_inkey_response_1211),
+ test_get_inkey_121,
+ expect_response_and_finish);
+ stktest_add_test("Get Inkey 12.2", "RequestDigit",
+ get_inkey_1221, sizeof(get_inkey_1221),
+ get_inkey_response_1221,
+ sizeof(get_inkey_response_1221),
+ test_get_inkey_122,
+ expect_response_and_finish);
}
static void test_destroy(gpointer user_data)