stktest: Add GetInput test sequence 2.1
authorDenis Kenzior <denkenz@gmail.com>
Thu, 18 Oct 2012 18:45:35 +0000 (13:45 -0500)
committerDenis Kenzior <denkenz@gmail.com>
Thu, 18 Oct 2012 18:45:35 +0000 (13:45 -0500)
tools/stktest.c

index 8ee699d..b789073 100644 (file)
@@ -2406,6 +2406,25 @@ static DBusMessage *test_get_input_110(DBusMessage *msg,
        return reply;
 }
 
+static DBusMessage *test_get_input_21(DBusMessage *msg,
+                                       const char *alpha,
+                                       unsigned char icon_id,
+                                       const char *def_input,
+                                       unsigned char min, unsigned char max,
+                                       gboolean hide_typing)
+{
+       DBusMessage *reply;
+
+       STKTEST_AGENT_ASSERT(g_str_equal(alpha, "&lt;TIME-OUT&gt;"));
+       STKTEST_AGENT_ASSERT(icon_id == 0);
+       STKTEST_AGENT_ASSERT(g_str_equal(def_input, ""));
+       STKTEST_AGENT_ASSERT(min == 0);
+       STKTEST_AGENT_ASSERT(max == 10);
+       STKTEST_AGENT_ASSERT(hide_typing == FALSE);
+
+       return NULL;
+}
+
 static void power_down_reply(DBusPendingCall *call, void *user_data)
 {
        __stktest_test_next();
@@ -2910,6 +2929,12 @@ static void __stktest_test_init(void)
                                sizeof(get_input_response_1101),
                                test_get_input_110,
                                expect_response_and_finish);
+       stktest_add_test("Get Input 2.1", "RequestDigits",
+                               get_input_211, sizeof(get_input_211),
+                               get_input_response_211,
+                               sizeof(get_input_response_211),
+                               test_get_input_21,
+                               expect_response_and_finish);
 }
 
 static void test_destroy(gpointer user_data)