mirror of git://git.sysmocom.de/ofono
stktest: Add GetInput test sequence 1.6
This commit is contained in:
parent
8bc7270203
commit
71d581d1fe
|
@ -2263,6 +2263,31 @@ static DBusMessage *test_get_input_14(DBusMessage *msg,
|
|||
return reply;
|
||||
}
|
||||
|
||||
static DBusMessage *test_get_input_15(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 = "12345678901234567890";
|
||||
|
||||
STKTEST_AGENT_ASSERT(g_str_equal(alpha,
|
||||
"Enter 1..9,0..9,0(1)"));
|
||||
STKTEST_AGENT_ASSERT(icon_id == 0);
|
||||
STKTEST_AGENT_ASSERT(g_str_equal(def_input, ""));
|
||||
STKTEST_AGENT_ASSERT(min == 1);
|
||||
STKTEST_AGENT_ASSERT(max == 20);
|
||||
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();
|
||||
|
@ -2731,6 +2756,12 @@ static void __stktest_test_init(void)
|
|||
sizeof(get_input_response_141),
|
||||
test_get_input_14,
|
||||
expect_response_and_finish);
|
||||
stktest_add_test("Get Input 1.5", "RequestDigits",
|
||||
get_input_151, sizeof(get_input_151),
|
||||
get_input_response_151,
|
||||
sizeof(get_input_response_151),
|
||||
test_get_input_15,
|
||||
expect_response_and_finish);
|
||||
}
|
||||
|
||||
static void test_destroy(gpointer user_data)
|
||||
|
|
Loading…
Reference in New Issue