summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--unit/test-stkutil.c1412
1 files changed, 1392 insertions, 20 deletions
diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index 82f2a1ca..abb82c92 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -60,9 +60,23 @@ static void check_duration(const struct stk_duration *command,
g_assert(command->interval == test->interval);
}
+/* Defined in TS 102.223 Section 8.11 */
+static void check_response_length(const struct stk_response_length *command,
+ const struct stk_response_length *test)
+{
+ g_assert(command->min == test->min);
+ g_assert(command->max == test->max);
+}
+
/* Defined in TS 102.223 Section 8.15 */
static inline void check_text(const char *command, const char *test)
{
+ if (test == NULL) {
+ g_assert(command == NULL);
+ return;
+ }
+
+ g_assert(command != NULL);
g_assert(g_str_equal(command, test));
}
@@ -1284,11 +1298,12 @@ struct get_input_test {
const unsigned char *pdu;
unsigned int pdu_len;
unsigned char qualifier;
- const char *expected;
- unsigned char min;
- unsigned char max;
- unsigned char icon_qualifier;
- unsigned char icon_id;
+ char *text;
+ struct stk_response_length response_length;
+ char *default_text;
+ struct stk_icon_id icon_id;
+ struct stk_text_attribute text_attribute;
+ struct stk_frame_id frame_id;
};
static unsigned char get_input_111[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
@@ -1298,13 +1313,1262 @@ static unsigned char get_input_111[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
0x32, 0x33, 0x34, 0x35, 0x91,
0x02, 0x05, 0x05 };
+static unsigned char get_input_121[] = { 0xD0, 0x1A, 0x81, 0x03, 0x01, 0x23,
+ 0x08, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0B, 0x00, 0x45, 0x37,
+ 0xBD, 0x2C, 0x07, 0xD9, 0x6E,
+ 0xAA, 0xD1, 0x0A, 0x91, 0x02,
+ 0x05, 0x05 };
+
+static unsigned char get_input_131[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+ 0x01, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x41,
+ 0x62, 0x43, 0x64, 0x45, 0x91,
+ 0x02, 0x05, 0x05 };
+
+static unsigned char get_input_141[] = { 0xD0, 0x27, 0x81, 0x03, 0x01, 0x23,
+ 0x04, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x18, 0x04, 0x50, 0x61,
+ 0x73, 0x73, 0x77, 0x6F, 0x72,
+ 0x64, 0x20, 0x31, 0x3C, 0x53,
+ 0x45, 0x4E, 0x44, 0x3E, 0x32,
+ 0x33, 0x34, 0x35, 0x36, 0x37,
+ 0x38, 0x91, 0x02, 0x04, 0x08 };
+
+static unsigned char get_input_151[] = { 0xD0, 0x24, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x15, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x31,
+ 0x2E, 0x2E, 0x39, 0x2C, 0x30,
+ 0x2E, 0x2E, 0x39, 0x2C, 0x30,
+ 0x28, 0x31, 0x29, 0x91, 0x02,
+ 0x01, 0x14 };
+
+static unsigned char get_input_161[] = { 0xD0, 0x1E, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0F, 0x04, 0x3C, 0x47,
+ 0x4F, 0x2D, 0x42, 0x41, 0x43,
+ 0x4B, 0x57, 0x41, 0x52, 0x44,
+ 0x53, 0x3E, 0x91, 0x02, 0x00,
+ 0x08 };
+
+static unsigned char get_input_171[] = { 0xD0, 0x17, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x08, 0x04, 0x3C, 0x41,
+ 0x42, 0x4F, 0x52, 0x54, 0x3E,
+ 0x91, 0x02, 0x00, 0x08 };
+
+static unsigned char get_input_181[] = { 0xD0, 0x81, 0xB1, 0x81, 0x03, 0x01,
+ 0x23, 0x00, 0x82, 0x02, 0x81,
+ 0x82, 0x8D, 0x81, 0xA1, 0x04,
+ 0x2A, 0x2A, 0x2A, 0x31, 0x31,
+ 0x31, 0x31, 0x31, 0x31, 0x31,
+ 0x31, 0x31, 0x31, 0x23, 0x23,
+ 0x23, 0x2A, 0x2A, 0x2A, 0x32,
+ 0x32, 0x32, 0x32, 0x32, 0x32,
+ 0x32, 0x32, 0x32, 0x32, 0x23,
+ 0x23, 0x23, 0x2A, 0x2A, 0x2A,
+ 0x33, 0x33, 0x33, 0x33, 0x33,
+ 0x33, 0x33, 0x33, 0x33, 0x33,
+ 0x23, 0x23, 0x23, 0x2A, 0x2A,
+ 0x2A, 0x34, 0x34, 0x34, 0x34,
+ 0x34, 0x34, 0x34, 0x34, 0x34,
+ 0x34, 0x23, 0x23, 0x23, 0x2A,
+ 0x2A, 0x2A, 0x35, 0x35, 0x35,
+ 0x35, 0x35, 0x35, 0x35, 0x35,
+ 0x35, 0x35, 0x23, 0x23, 0x23,
+ 0x2A, 0x2A, 0x2A, 0x36, 0x36,
+ 0x36, 0x36, 0x36, 0x36, 0x36,
+ 0x36, 0x36, 0x36, 0x23, 0x23,
+ 0x23, 0x2A, 0x2A, 0x2A, 0x37,
+ 0x37, 0x37, 0x37, 0x37, 0x37,
+ 0x37, 0x37, 0x37, 0x37, 0x23,
+ 0x23, 0x23, 0x2A, 0x2A, 0x2A,
+ 0x38, 0x38, 0x38, 0x38, 0x38,
+ 0x38, 0x38, 0x38, 0x38, 0x38,
+ 0x23, 0x23, 0x23, 0x2A, 0x2A,
+ 0x2A, 0x39, 0x39, 0x39, 0x39,
+ 0x39, 0x39, 0x39, 0x39, 0x39,
+ 0x39, 0x23, 0x23, 0x23, 0x2A,
+ 0x2A, 0x2A, 0x30, 0x30, 0x30,
+ 0x30, 0x30, 0x30, 0x30, 0x30,
+ 0x30, 0x30, 0x23, 0x23, 0x23,
+ 0x91, 0x02, 0xA0, 0xA0 };
+
+static unsigned char get_input_191[] = { 0xD0, 0x16, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x07, 0x04, 0x3C, 0x53,
+ 0x45, 0x4E, 0x44, 0x3E, 0x91,
+ 0x02, 0x00, 0x01 };
+
+static unsigned char get_input_1101[] = { 0xD0, 0x0F, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x00, 0x91, 0x02, 0x01,
+ 0x05 };
+
+static unsigned char get_input_211[] = { 0xD0, 0x1A, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0B, 0x04, 0x3C, 0x54,
+ 0x49, 0x4D, 0x45, 0x2D, 0x4F,
+ 0x55, 0x54, 0x3E, 0x91, 0x02,
+ 0x00, 0x0A };
+
+static unsigned char get_input_311[] = { 0xD0, 0x28, 0x81, 0x03, 0x01, 0x23,
+ 0x01, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x19, 0x08, 0x04, 0x17,
+ 0x04, 0x14, 0x04, 0x20, 0x04,
+ 0x10, 0x04, 0x12, 0x04, 0x21,
+ 0x04, 0x22, 0x04, 0x12, 0x04,
+ 0x23, 0x04, 0x19, 0x04, 0x22,
+ 0x04, 0x15, 0x91, 0x02, 0x05,
+ 0x05 };
+
+static unsigned char get_input_321[] = { 0xD0, 0x81, 0x9D, 0x81, 0x03, 0x01,
+ 0x23, 0x01, 0x82, 0x02, 0x81,
+ 0x82, 0x8D, 0x81, 0x8D, 0x08,
+ 0x04, 0x17, 0x04, 0x14, 0x04,
+ 0x20, 0x04, 0x10, 0x04, 0x12,
+ 0x04, 0x21, 0x04, 0x22, 0x04,
+ 0x12, 0x04, 0x23, 0x04, 0x19,
+ 0x04, 0x22, 0x04, 0x15, 0x04,
+ 0x17, 0x04, 0x14, 0x04, 0x20,
+ 0x04, 0x10, 0x04, 0x12, 0x04,
+ 0x21, 0x04, 0x22, 0x04, 0x12,
+ 0x04, 0x23, 0x04, 0x19, 0x04,
+ 0x22, 0x04, 0x15, 0x04, 0x17,
+ 0x04, 0x14, 0x04, 0x20, 0x04,
+ 0x10, 0x04, 0x12, 0x04, 0x21,
+ 0x04, 0x22, 0x04, 0x12, 0x04,
+ 0x23, 0x04, 0x19, 0x04, 0x22,
+ 0x04, 0x15, 0x04, 0x17, 0x04,
+ 0x14, 0x04, 0x20, 0x04, 0x10,
+ 0x04, 0x12, 0x04, 0x21, 0x04,
+ 0x22, 0x04, 0x12, 0x04, 0x23,
+ 0x04, 0x19, 0x04, 0x22, 0x04,
+ 0x15, 0x04, 0x17, 0x04, 0x14,
+ 0x04, 0x20, 0x04, 0x10, 0x04,
+ 0x12, 0x04, 0x21, 0x04, 0x22,
+ 0x04, 0x12, 0x04, 0x23, 0x04,
+ 0x19, 0x04, 0x22, 0x04, 0x15,
+ 0x04, 0x17, 0x04, 0x14, 0x04,
+ 0x20, 0x04, 0x10, 0x04, 0x12,
+ 0x04, 0x21, 0x04, 0x22, 0x04,
+ 0x12, 0x04, 0x23, 0x04, 0x19,
+ 0x91, 0x02, 0x05, 0x05 };
+
+static unsigned char get_input_411[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+ 0x03, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x48,
+ 0x65, 0x6C, 0x6C, 0x6F, 0x91,
+ 0x02, 0x0C, 0x0C };
+
+static unsigned char get_input_421[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+ 0x03, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x48,
+ 0x65, 0x6C, 0x6C, 0x6F, 0x91,
+ 0x02, 0x05, 0xFF };
+
+static unsigned char get_input_511[] = { 0xD0, 0x23, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x31,
+ 0x32, 0x33, 0x34, 0x35, 0x91,
+ 0x02, 0x05, 0x05, 0x17, 0x06,
+ 0x04, 0x31, 0x32, 0x33, 0x34,
+ 0x35 };
+
+static unsigned char get_input_521[] = { 0xD0, 0x81, 0xBA, 0x81, 0x03, 0x01,
+ 0x23, 0x00, 0x82, 0x02, 0x81,
+ 0x82, 0x8D, 0x07, 0x04, 0x45,
+ 0x6E, 0x74, 0x65, 0x72, 0x3A,
+ 0x91, 0x02, 0xA0, 0xA0, 0x17,
+ 0x81, 0xA1, 0x04, 0x2A, 0x2A,
+ 0x2A, 0x31, 0x31, 0x31, 0x31,
+ 0x31, 0x31, 0x31, 0x31, 0x31,
+ 0x31, 0x23, 0x23, 0x23, 0x2A,
+ 0x2A, 0x2A, 0x32, 0x32, 0x32,
+ 0x32, 0x32, 0x32, 0x32, 0x32,
+ 0x32, 0x32, 0x23, 0x23, 0x23,
+ 0x2A, 0x2A, 0x2A, 0x33, 0x33,
+ 0x33, 0x33, 0x33, 0x33, 0x33,
+ 0x33, 0x33, 0x33, 0x23, 0x23,
+ 0x23, 0x2A, 0x2A, 0x2A, 0x34,
+ 0x34, 0x34, 0x34, 0x34, 0x34,
+ 0x34, 0x34, 0x34, 0x34, 0x23,
+ 0x23, 0x23, 0x2A, 0x2A, 0x2A,
+ 0x35, 0x35, 0x35, 0x35, 0x35,
+ 0x35, 0x35, 0x35, 0x35, 0x35,
+ 0x23, 0x23, 0x23, 0x2A, 0x2A,
+ 0x2A, 0x36, 0x36, 0x36, 0x36,
+ 0x36, 0x36, 0x36, 0x36, 0x36,
+ 0x36, 0x23, 0x23, 0x23, 0x2A,
+ 0x2A, 0x2A, 0x37, 0x37, 0x37,
+ 0x37, 0x37, 0x37, 0x37, 0x37,
+ 0x37, 0x37, 0x23, 0x23, 0x23,
+ 0x2A, 0x2A, 0x2A, 0x38, 0x38,
+ 0x38, 0x38, 0x38, 0x38, 0x38,
+ 0x38, 0x38, 0x38, 0x23, 0x23,
+ 0x23, 0x2A, 0x2A, 0x2A, 0x39,
+ 0x39, 0x39, 0x39, 0x39, 0x39,
+ 0x39, 0x39, 0x39, 0x39, 0x23,
+ 0x23, 0x23, 0x2A, 0x2A, 0x2A,
+ 0x30, 0x30, 0x30, 0x30, 0x30,
+ 0x30, 0x30, 0x30, 0x30, 0x30,
+ 0x23, 0x23, 0x23 };
+
+static unsigned char get_input_611[] = { 0xD0, 0x1D, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0A, 0x04, 0x3C, 0x4E,
+ 0x4F, 0x2D, 0x49, 0x43, 0x4F,
+ 0x4E, 0x3E, 0x91, 0x02, 0x00,
+ 0x0A, 0x1E, 0x02, 0x00, 0x01 };
+
+static unsigned char get_input_621[] = { 0xD0, 0x20, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0D, 0x04, 0x3C, 0x42,
+ 0x41, 0x53, 0x49, 0x43, 0x2D,
+ 0x49, 0x43, 0x4F, 0x4E, 0x3E,
+ 0x91, 0x02, 0x00, 0x0A, 0x1E,
+ 0x02, 0x01, 0x01 };
+
+static unsigned char get_input_631[] = { 0xD0, 0x1D, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0A, 0x04, 0x3C, 0x4E,
+ 0x4F, 0x2D, 0x49, 0x43, 0x4F,
+ 0x4E, 0x3E, 0x91, 0x02, 0x00,
+ 0x0A, 0x1E, 0x02, 0x00, 0x02 };
+
+static unsigned char get_input_641[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0E, 0x04, 0x3C, 0x43,
+ 0x4F, 0x4C, 0x4F, 0x55, 0x52,
+ 0x2D, 0x49, 0x43, 0x4F, 0x4E,
+ 0x3E, 0x91, 0x02, 0x00, 0x0A,
+ 0x1E, 0x02, 0x01, 0x02 };
+
+static unsigned char get_input_711[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+ 0x80, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x31,
+ 0x32, 0x33, 0x34, 0x35, 0x91,
+ 0x02, 0x05, 0x05 };
+
+static unsigned char get_input_811[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x31,
+ 0x32, 0x33, 0x34, 0x35, 0x91,
+ 0x02, 0x05, 0x05, 0xD0, 0x04,
+ 0x00, 0x0B, 0x00, 0xB4 };
+
+static unsigned char get_input_812[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x32,
+ 0x32, 0x32, 0x32, 0x32, 0x91,
+ 0x02, 0x05, 0x05 };
+
+static unsigned char get_input_821[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x31,
+ 0x32, 0x33, 0x34, 0x35, 0x91,
+ 0x02, 0x05, 0x05, 0xD0, 0x04,
+ 0x00, 0x0B, 0x01, 0xB4 };
+
+static unsigned char get_input_822[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x32,
+ 0x32, 0x32, 0x32, 0x32, 0x91,
+ 0x02, 0x05, 0x05 };
+
+static unsigned char get_input_831[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x31,
+ 0x32, 0x33, 0x34, 0x35, 0x91,
+ 0x02, 0x05, 0x05, 0xD0, 0x04,
+ 0x00, 0x0B, 0x02, 0xB4 };
+
+static unsigned char get_input_832[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x32,
+ 0x32, 0x32, 0x32, 0x32, 0x91,
+ 0x02, 0x05, 0x05 };
+
+static unsigned char get_input_841[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x31,
+ 0x32, 0x33, 0x34, 0x35, 0x91,
+ 0x02, 0x05, 0x05, 0xD0, 0x04,
+ 0x00, 0x0B, 0x04, 0xB4 };
+
+static unsigned char get_input_842[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x32,
+ 0x32, 0x32, 0x32, 0x32, 0x91,
+ 0x02, 0x05, 0x05, 0xD0, 0x04,
+ 0x00, 0x0B, 0x00, 0xB4 };
+
+static unsigned char get_input_843[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x33,
+ 0x33, 0x33, 0x33, 0x33, 0x91,
+ 0x02, 0x05, 0x05 };
+
+static unsigned char get_input_851[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x31,
+ 0x32, 0x33, 0x34, 0x35, 0x91,
+ 0x02, 0x05, 0x05, 0xD0, 0x04,
+ 0x00, 0x0B, 0x08, 0xB4 };
+
+static unsigned char get_input_852[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x32,
+ 0x32, 0x32, 0x32, 0x32, 0x91,
+ 0x02, 0x05, 0x05, 0xD0, 0x04,
+ 0x00, 0x0B, 0x00, 0xB4 };
+
+static unsigned char get_input_853[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x33,
+ 0x33, 0x33, 0x33, 0x33, 0x91,
+ 0x02, 0x05, 0x05 };
+
+static unsigned char get_input_861[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x31,
+ 0x32, 0x33, 0x34, 0x35, 0x91,
+ 0x02, 0x05, 0x05, 0xD0, 0x04,
+ 0x00, 0x0B, 0x10, 0xB4 };
+
+static unsigned char get_input_862[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x32,
+ 0x32, 0x32, 0x32, 0x32, 0x91,
+ 0x02, 0x05, 0x05, 0xD0, 0x04,
+ 0x00, 0x0B, 0x00, 0xB4 };
+
+static unsigned char get_input_863[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x33,
+ 0x33, 0x33, 0x33, 0x33, 0x91,
+ 0x02, 0x05, 0x05 };
+
+static unsigned char get_input_871[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x31,
+ 0x32, 0x33, 0x34, 0x35, 0x91,
+ 0x02, 0x05, 0x05, 0xD0, 0x04,
+ 0x00, 0x0B, 0x20, 0xB4 };
+
+static unsigned char get_input_872[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x32,
+ 0x32, 0x32, 0x32, 0x32, 0x91,
+ 0x02, 0x05, 0x05, 0xD0, 0x04,
+ 0x00, 0x0B, 0x00, 0xB4 };
+
+static unsigned char get_input_873[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x33,
+ 0x33, 0x33, 0x33, 0x33, 0x91,
+ 0x02, 0x05, 0x05 };
+
+static unsigned char get_input_881[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x31,
+ 0x32, 0x33, 0x34, 0x35, 0x91,
+ 0x02, 0x05, 0x05, 0xD0, 0x04,
+ 0x00, 0x0B, 0x40, 0xB4 };
+
+static unsigned char get_input_882[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x32,
+ 0x32, 0x32, 0x32, 0x32, 0x91,
+ 0x02, 0x05, 0x05, 0xD0, 0x04,
+ 0x00, 0x0B, 0x00, 0xB4 };
+
+static unsigned char get_input_883[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x33,
+ 0x33, 0x33, 0x33, 0x33, 0x91,
+ 0x02, 0x05, 0x05 };
+
+static unsigned char get_input_891[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x31,
+ 0x32, 0x33, 0x34, 0x35, 0x91,
+ 0x02, 0x05, 0x05, 0xD0, 0x04,
+ 0x00, 0x0B, 0x80, 0xB4 };
+
+static unsigned char get_input_892[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x32,
+ 0x32, 0x32, 0x32, 0x32, 0x91,
+ 0x02, 0x05, 0x05, 0xD0, 0x04,
+ 0x00, 0x0B, 0x00, 0xB4 };
+
+static unsigned char get_input_893[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x33,
+ 0x33, 0x33, 0x33, 0x33, 0x91,
+ 0x02, 0x05, 0x05 };
+
+static unsigned char get_input_8101[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x31,
+ 0x32, 0x33, 0x34, 0x35, 0x91,
+ 0x02, 0x05, 0x05, 0xD0, 0x04,
+ 0x00, 0x0B, 0x00, 0xB4 };
+
+static unsigned char get_input_8102[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+ 0x00, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x32,
+ 0x32, 0x32, 0x32, 0x32, 0x91,
+ 0x02, 0x05, 0x05 };
+
+static unsigned char get_input_911[] = { 0xD0, 0x14, 0x81, 0x03, 0x01, 0x23,
+ 0x01, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x05, 0x08, 0x4F, 0x60,
+ 0x59, 0x7D, 0x91, 0x02, 0x05,
+ 0x05 };
+
+static unsigned char get_input_921[] = { 0xD0, 0x81, 0x9D, 0x81, 0x03, 0x01,
+ 0x23, 0x01, 0x82, 0x02, 0x81,
+ 0x82, 0x8D, 0x81, 0x8D, 0x08,
+ 0x4F, 0x60, 0x59, 0x7D, 0x4F,
+ 0x60, 0x59, 0x7D, 0x4F, 0x60,
+ 0x59, 0x7D, 0x4F, 0x60, 0x59,
+ 0x7D, 0x4F, 0x60, 0x59, 0x7D,
+ 0x4F, 0x60, 0x59, 0x7D, 0x4F,
+ 0x60, 0x59, 0x7D, 0x4F, 0x60,
+ 0x59, 0x7D, 0x4F, 0x60, 0x59,
+ 0x7D, 0x4F, 0x60, 0x59, 0x7D,
+ 0x4F, 0x60, 0x59, 0x7D, 0x4F,
+ 0x60, 0x59, 0x7D, 0x4F, 0x60,
+ 0x59, 0x7D, 0x4F, 0x60, 0x59,
+ 0x7D, 0x4F, 0x60, 0x59, 0x7D,
+ 0x4F, 0x60, 0x59, 0x7D, 0x4F,
+ 0x60, 0x59, 0x7D, 0x4F, 0x60,
+ 0x59, 0x7D, 0x4F, 0x60, 0x59,
+ 0x7D, 0x4F, 0x60, 0x59, 0x7D,
+ 0x4F, 0x60, 0x59, 0x7D, 0x4F,
+ 0x60, 0x59, 0x7D, 0x4F, 0x60,
+ 0x59, 0x7D, 0x4F, 0x60, 0x59,
+ 0x7D, 0x4F, 0x60, 0x59, 0x7D,
+ 0x4F, 0x60, 0x59, 0x7D, 0x4F,
+ 0x60, 0x59, 0x7D, 0x4F, 0x60,
+ 0x59, 0x7D, 0x4F, 0x60, 0x59,
+ 0x7D, 0x4F, 0x60, 0x59, 0x7D,
+ 0x4F, 0x60, 0x59, 0x7D, 0x4F,
+ 0x60, 0x59, 0x7D, 0x4F, 0x60,
+ 0x59, 0x7D, 0x4F, 0x60, 0x59,
+ 0x7D, 0x4F, 0x60, 0x59, 0x7D,
+ 0x91, 0x02, 0x05, 0x05 };
+
+static unsigned char get_input_1011[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+ 0x03, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x48,
+ 0x65, 0x6C, 0x6C, 0x6F, 0x91,
+ 0x02, 0x02, 0x02 };
+
+static unsigned char get_input_1021[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+ 0x03, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x48,
+ 0x65, 0x6C, 0x6C, 0x6F, 0x91,
+ 0x02, 0x05, 0xFF };
+
+static unsigned char get_input_1111[] = { 0xD0, 0x12, 0x81, 0x03, 0x01, 0x23,
+ 0x01, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x03, 0x08, 0x30, 0xEB,
+ 0x91, 0x02, 0x05, 0x05 };
+
+static unsigned char get_input_1121[] = { 0xD0, 0x81, 0x9D, 0x81, 0x03, 0x01,
+ 0x23, 0x01, 0x82, 0x02, 0x81,
+ 0x82, 0x8D, 0x81, 0x8D, 0x08,
+ 0x30, 0xEB, 0x30, 0xEB, 0x30,
+ 0xEB, 0x30, 0xEB, 0x30, 0xEB,
+ 0x30, 0xEB, 0x30, 0xEB, 0x30,
+ 0xEB, 0x30, 0xEB, 0x30, 0xEB,
+ 0x30, 0xEB, 0x30, 0xEB, 0x30,
+ 0xEB, 0x30, 0xEB, 0x30, 0xEB,
+ 0x30, 0xEB, 0x30, 0xEB, 0x30,
+ 0xEB, 0x30, 0xEB, 0x30, 0xEB,
+ 0x30, 0xEB, 0x30, 0xEB, 0x30,
+ 0xEB, 0x30, 0xEB, 0x30, 0xEB,
+ 0x30, 0xEB, 0x30, 0xEB, 0x30,
+ 0xEB, 0x30, 0xEB, 0x30, 0xEB,
+ 0x30, 0xEB, 0x30, 0xEB, 0x30,
+ 0xEB, 0x30, 0xEB, 0x30, 0xEB,
+ 0x30, 0xEB, 0x30, 0xEB, 0x30,
+ 0xEB, 0x30, 0xEB, 0x30, 0xEB,
+ 0x30, 0xEB, 0x30, 0xEB, 0x30,
+ 0xEB, 0x30, 0xEB, 0x30, 0xEB,
+ 0x30, 0xEB, 0x30, 0xEB, 0x30,
+ 0xEB, 0x30, 0xEB, 0x30, 0xEB,
+ 0x30, 0xEB, 0x30, 0xEB, 0x30,
+ 0xEB, 0x30, 0xEB, 0x30, 0xEB,
+ 0x30, 0xEB, 0x30, 0xEB, 0x30,
+ 0xEB, 0x30, 0xEB, 0x30, 0xEB,
+ 0x30, 0xEB, 0x30, 0xEB, 0x30,
+ 0xEB, 0x30, 0xEB, 0x30, 0xEB,
+ 0x30, 0xEB, 0x30, 0xEB, 0x30,
+ 0xEB, 0x30, 0xEB, 0x30, 0xEB,
+ 0x91, 0x02, 0x05, 0x05 };
+
+static unsigned char get_input_1211[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+ 0x03, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x48,
+ 0x65, 0x6C, 0x6C, 0x6F, 0x91,
+ 0x02, 0x02, 0x02 };
+
+static unsigned char get_input_1221[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+ 0x03, 0x82, 0x02, 0x81, 0x82,
+ 0x8D, 0x0C, 0x04, 0x45, 0x6E,
+ 0x74, 0x65, 0x72, 0x20, 0x48,
+ 0x65, 0x6C, 0x6C, 0x6F, 0x91,
+ 0x02, 0x05, 0xFF };
+
static struct get_input_test get_input_data_111 = {
.pdu = get_input_111,
.pdu_len = sizeof(get_input_111),
- .expected = "Enter 12345",
.qualifier = 0x00,
- .min = 5,
- .max = 5
+ .text = "Enter 12345",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ }
+};
+
+static struct get_input_test get_input_data_121 = {
+ .pdu = get_input_121,
+ .pdu_len = sizeof(get_input_121),
+ .qualifier = 0x08,
+ .text = "Enter 67*#+",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ }
+};
+
+static struct get_input_test get_input_data_131 = {
+ .pdu = get_input_131,
+ .pdu_len = sizeof(get_input_131),
+ .qualifier = 0x01,
+ .text = "Enter AbCdE",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ }
+};
+
+static struct get_input_test get_input_data_141 = {
+ .pdu = get_input_141,
+ .pdu_len = sizeof(get_input_141),
+ .qualifier = 0x04,
+ .text = "Password 1<SEND>2345678",
+ .response_length = {
+ .min = 4,
+ .max = 8
+ }
+};
+
+static struct get_input_test get_input_data_151 = {
+ .pdu = get_input_151,
+ .pdu_len = sizeof(get_input_151),
+ .qualifier = 0x00,
+ .text = "Enter 1..9,0..9,0(1)",
+ .response_length = {
+ .min = 1,
+ .max = 20
+ }
+};
+
+static struct get_input_test get_input_data_161 = {
+ .pdu = get_input_161,
+ .pdu_len = sizeof(get_input_161),
+ .qualifier = 0x00,
+ .text = "<GO-BACKWARDS>",
+ .response_length = {
+ .min = 0,
+ .max = 8
+ }
+};
+
+static struct get_input_test get_input_data_171 = {
+ .pdu = get_input_171,
+ .pdu_len = sizeof(get_input_171),
+ .qualifier = 0x00,
+ .text = "<ABORT>",
+ .response_length = {
+ .min = 0,
+ .max = 8
+ }
+};
+
+static struct get_input_test get_input_data_181 = {
+ .pdu = get_input_181,
+ .pdu_len = sizeof(get_input_181),
+ .qualifier = 0x00,
+ .text = "***1111111111###***2222222222###***3333333333###"
+ "***4444444444###***5555555555###***6666666666###"
+ "***7777777777###***8888888888###***9999999999###"
+ "***0000000000###",
+ .response_length = {
+ .min = 160,
+ .max = 160
+ }
+};
+
+static struct get_input_test get_input_data_191 = {
+ .pdu = get_input_191,
+ .pdu_len = sizeof(get_input_191),
+ .qualifier = 0x00,
+ .text = "<SEND>",
+ .response_length = {
+ .min = 0,
+ .max = 1
+ }
+};
+
+static struct get_input_test get_input_data_1101 = {
+ .pdu = get_input_1101,
+ .pdu_len = sizeof(get_input_1101),
+ .qualifier = 0x00,
+ .text = NULL,
+ .response_length = {
+ .min = 1,
+ .max = 5
+ }
+};
+
+static struct get_input_test get_input_data_211 = {
+ .pdu = get_input_211,
+ .pdu_len = sizeof(get_input_211),
+ .qualifier = 0x00,
+ .text = "<TIME-OUT>",
+ .response_length = {
+ .min = 0,
+ .max = 10
+ }
+};
+
+static struct get_input_test get_input_data_311 = {
+ .pdu = get_input_311,
+ .pdu_len = sizeof(get_input_311),
+ .qualifier = 0x01,
+ .text = "ЗДРАВСТВУЙТЕ",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ }
+};
+
+static struct get_input_test get_input_data_321 = {
+ .pdu = get_input_321,
+ .pdu_len = sizeof(get_input_321),
+ .qualifier = 0x01,
+ .text = "ЗДРАВСТВУЙТЕЗДРАВСТВУЙТЕ"
+ "ЗДРАВСТВУЙТЕЗДРАВСТВУЙТЕ"
+ "ЗДРАВСТВУЙТЕЗДРАВСТВУЙ",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ }
+};
+
+static struct get_input_test get_input_data_411 = {
+ .pdu = get_input_411,
+ .pdu_len = sizeof(get_input_411),
+ .qualifier = 0x03,
+ .text = "Enter Hello",
+ .response_length = {
+ .min = 12,
+ .max = 12
+ }
+};
+
+static struct get_input_test get_input_data_421 = {
+ .pdu = get_input_421,
+ .pdu_len = sizeof(get_input_421),
+ .qualifier = 0x03,
+ .text = "Enter Hello",
+ .response_length = {
+ .min = 5,
+ .max = 0xFF
+ }
+};
+
+static struct get_input_test get_input_data_511 = {
+ .pdu = get_input_511,
+ .pdu_len = sizeof(get_input_511),
+ .qualifier = 0x00,
+ .text = "Enter 12345",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ },
+ .default_text = "12345"
+};
+
+static struct get_input_test get_input_data_521 = {
+ .pdu = get_input_521,
+ .pdu_len = sizeof(get_input_521),
+ .qualifier = 0x00,
+ .text = "Enter:",
+ .response_length = {
+ .min = 160,
+ .max = 160
+ },
+ .default_text = "***1111111111###***2222222222###***3333333333###"
+ "***4444444444###***5555555555###***6666666666###"
+ "***7777777777###***8888888888###***9999999999###"
+ "***0000000000###"
+};
+
+static struct get_input_test get_input_data_611 = {
+ .pdu = get_input_611,
+ .pdu_len = sizeof(get_input_611),
+ .qualifier = 0x00,
+ .text = "<NO-ICON>",
+ .response_length = {
+ .min = 0,
+ .max = 10
+ },
+ .icon_id = {
+ .qualifier = STK_ICON_QUALIFIER_TYPE_SELF_EXPLANATORY,
+ .id = 0x01
+ }
+};
+
+static struct get_input_test get_input_data_621 = {
+ .pdu = get_input_621,
+ .pdu_len = sizeof(get_input_621),
+ .qualifier = 0x00,
+ .text = "<BASIC-ICON>",
+ .response_length = {
+ .min = 0,
+ .max = 10
+ },
+ .icon_id = {
+ .qualifier = STK_ICON_QUALIFIER_TYPE_NON_SELF_EXPLANATORY,
+ .id = 0x01
+ }
+};
+
+static struct get_input_test get_input_data_631 = {
+ .pdu = get_input_631,
+ .pdu_len = sizeof(get_input_631),
+ .qualifier = 0x00,
+ .text = "<NO-ICON>",
+ .response_length = {
+ .min = 0,
+ .max = 10
+ },
+ .icon_id = {
+ .qualifier = STK_ICON_QUALIFIER_TYPE_SELF_EXPLANATORY,
+ .id = 0x02
+ }
+};
+
+static struct get_input_test get_input_data_641 = {
+ .pdu = get_input_641,
+ .pdu_len = sizeof(get_input_641),
+ .qualifier = 0x00,
+ .text = "<COLOUR-ICON>",
+ .response_length = {
+ .min = 0,
+ .max = 10
+ },
+ .icon_id = {
+ .qualifier = STK_ICON_QUALIFIER_TYPE_NON_SELF_EXPLANATORY,
+ .id = 0x02
+ }
+};
+
+static struct get_input_test get_input_data_711 = {
+ .pdu = get_input_711,
+ .pdu_len = sizeof(get_input_711),
+ .qualifier = 0x80,
+ .text = "Enter 12345",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ }
+};
+
+static struct get_input_test get_input_data_811 = {
+ .pdu = get_input_811,
+ .pdu_len = sizeof(get_input_811),
+ .qualifier = 0x00,
+ .text = "Enter 12345",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ },
+ .text_attribute = {
+ .len = 4,
+ .attributes = { 0x00, 0x0B, 0x00, 0xB4 }
+ }
+};
+
+static struct get_input_test get_input_data_812 = {
+ .pdu = get_input_812,
+ .pdu_len = sizeof(get_input_812),
+ .qualifier = 0x00,
+ .text = "Enter 22222",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ }
+};
+
+static struct get_input_test get_input_data_821 = {
+ .pdu = get_input_821,
+ .pdu_len = sizeof(get_input_821),
+ .qualifier = 0x00,
+ .text = "Enter 12345",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ },
+ .text_attribute = {
+ .len = 4,
+ .attributes = { 0x00, 0x0B, 0x01, 0xB4 }
+ }
+};
+
+static struct get_input_test get_input_data_822 = {
+ .pdu = get_input_822,
+ .pdu_len = sizeof(get_input_822),
+ .qualifier = 0x00,
+ .text = "Enter 22222",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ }
+};
+
+static struct get_input_test get_input_data_831 = {
+ .pdu = get_input_831,
+ .pdu_len = sizeof(get_input_831),
+ .qualifier = 0x00,
+ .text = "Enter 12345",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ },
+ .text_attribute = {
+ .len = 4,
+ .attributes = { 0x00, 0x0B, 0x02, 0xB4 }
+ }
+};
+
+static struct get_input_test get_input_data_832 = {
+ .pdu = get_input_832,
+ .pdu_len = sizeof(get_input_832),
+ .qualifier = 0x00,
+ .text = "Enter 22222",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ }
+};
+
+static struct get_input_test get_input_data_841 = {
+ .pdu = get_input_841,
+ .pdu_len = sizeof(get_input_841),
+ .qualifier = 0x00,
+ .text = "Enter 12345",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ },
+ .text_attribute = {
+ .len = 4,
+ .attributes = { 0x00, 0x0B, 0x04, 0xB4 }
+ }
+};
+
+static struct get_input_test get_input_data_842 = {
+ .pdu = get_input_842,
+ .pdu_len = sizeof(get_input_842),
+ .qualifier = 0x00,
+ .text = "Enter 22222",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ },
+ .text_attribute = {
+ .len = 4,
+ .attributes = { 0x00, 0x0B, 0x00, 0xB4 }
+ }
+};
+
+static struct get_input_test get_input_data_843 = {
+ .pdu = get_input_843,
+ .pdu_len = sizeof(get_input_843),
+ .qualifier = 0x00,
+ .text = "Enter 33333",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ }
+};
+
+static struct get_input_test get_input_data_851 = {
+ .pdu = get_input_851,
+ .pdu_len = sizeof(get_input_851),
+ .qualifier = 0x00,
+ .text = "Enter 12345",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ },
+ .text_attribute = {
+ .len = 4,
+ .attributes = { 0x00, 0x0B, 0x08, 0xB4 }
+ }
+};
+
+static struct get_input_test get_input_data_852 = {
+ .pdu = get_input_852,
+ .pdu_len = sizeof(get_input_852),
+ .qualifier = 0x00,
+ .text = "Enter 22222",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ },
+ .text_attribute = {
+ .len = 4,
+ .attributes = { 0x00, 0x0B, 0x00, 0xB4 }
+ }
+};
+
+static struct get_input_test get_input_data_853 = {
+ .pdu = get_input_853,
+ .pdu_len = sizeof(get_input_853),
+ .qualifier = 0x00,
+ .text = "Enter 33333",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ }
+};
+
+static struct get_input_test get_input_data_861 = {
+ .pdu = get_input_861,
+ .pdu_len = sizeof(get_input_861),
+ .qualifier = 0x00,
+ .text = "Enter 12345",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ },
+ .text_attribute = {
+ .len = 4,
+ .attributes = { 0x00, 0x0B, 0x10, 0xB4 }
+ }
+};
+
+static struct get_input_test get_input_data_862 = {
+ .pdu = get_input_862,
+ .pdu_len = sizeof(get_input_862),
+ .qualifier = 0x00,
+ .text = "Enter 22222",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ },
+ .text_attribute = {
+ .len = 4,
+ .attributes = { 0x00, 0x0B, 0x00, 0xB4 }
+ }
+};
+
+static struct get_input_test get_input_data_863 = {
+ .pdu = get_input_863,
+ .pdu_len = sizeof(get_input_863),
+ .qualifier = 0x00,
+ .text = "Enter 33333",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ }
+};
+
+static struct get_input_test get_input_data_871 = {
+ .pdu = get_input_871,
+ .pdu_len = sizeof(get_input_871),
+ .qualifier = 0x00,
+ .text = "Enter 12345",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ },
+ .text_attribute = {
+ .len = 4,
+ .attributes = { 0x00, 0x0B, 0x20, 0xB4 }
+ }
+};
+
+static struct get_input_test get_input_data_872 = {
+ .pdu = get_input_872,
+ .pdu_len = sizeof(get_input_872),
+ .qualifier = 0x00,
+ .text = "Enter 22222",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ },
+ .text_attribute = {
+ .len = 4,
+ .attributes = { 0x00, 0x0B, 0x00, 0xB4 }
+ }
+};
+
+static struct get_input_test get_input_data_873 = {
+ .pdu = get_input_873,
+ .pdu_len = sizeof(get_input_873),
+ .qualifier = 0x00,
+ .text = "Enter 33333",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ }
+};
+
+static struct get_input_test get_input_data_881 = {
+ .pdu = get_input_881,
+ .pdu_len = sizeof(get_input_881),
+ .qualifier = 0x00,
+ .text = "Enter 12345",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ },
+ .text_attribute = {
+ .len = 4,
+ .attributes = { 0x00, 0x0B, 0x40, 0xB4 }
+ }
+};
+
+static struct get_input_test get_input_data_882 = {
+ .pdu = get_input_882,
+ .pdu_len = sizeof(get_input_882),
+ .qualifier = 0x00,
+ .text = "Enter 22222",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ },
+ .text_attribute = {
+ .len = 4,
+ .attributes = { 0x00, 0x0B, 0x00, 0xB4 }
+ }
+};
+
+static struct get_input_test get_input_data_883 = {
+ .pdu = get_input_883,
+ .pdu_len = sizeof(get_input_883),
+ .qualifier = 0x00,
+ .text = "Enter 33333",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ }
+};
+
+static struct get_input_test get_input_data_891 = {
+ .pdu = get_input_891,
+ .pdu_len = sizeof(get_input_891),
+ .qualifier = 0x00,
+ .text = "Enter 12345",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ },
+ .text_attribute = {
+ .len = 4,
+ .attributes = { 0x00, 0x0B, 0x80, 0xB4 }
+ }
+};
+
+static struct get_input_test get_input_data_892 = {
+ .pdu = get_input_892,
+ .pdu_len = sizeof(get_input_892),
+ .qualifier = 0x00,
+ .text = "Enter 22222",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ },
+ .text_attribute = {
+ .len = 4,
+ .attributes = { 0x00, 0x0B, 0x00, 0xB4 }
+ }
+};
+
+static struct get_input_test get_input_data_893 = {
+ .pdu = get_input_893,
+ .pdu_len = sizeof(get_input_893),
+ .qualifier = 0x00,
+ .text = "Enter 33333",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ }
+};
+
+static struct get_input_test get_input_data_8101 = {
+ .pdu = get_input_8101,
+ .pdu_len = sizeof(get_input_8101),
+ .qualifier = 0x00,
+ .text = "Enter 12345",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ },
+ .text_attribute = {
+ .len = 4,
+ .attributes = { 0x00, 0x0B, 0x00, 0xB4 }
+ }
+};
+
+static struct get_input_test get_input_data_8102 = {
+ .pdu = get_input_8102,
+ .pdu_len = sizeof(get_input_8102),
+ .qualifier = 0x00,
+ .text = "Enter 22222",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ }
+};
+
+static struct get_input_test get_input_data_911 = {
+ .pdu = get_input_911,
+ .pdu_len = sizeof(get_input_911),
+ .qualifier = 0x01,
+ .text = "你好",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ }
+};
+
+static struct get_input_test get_input_data_921 = {
+ .pdu = get_input_921,
+ .pdu_len = sizeof(get_input_921),
+ .qualifier = 0x01,
+ .text = "你好你好你好你好你好你好你好你好你好你好"
+ "你好你好你好你好你好你好你好你好你好你好"
+ "你好你好你好你好你好你好你好你好你好你好"
+ "你好你好你好你好你好",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ }
+};
+
+static struct get_input_test get_input_data_1011 = {
+ .pdu = get_input_1011,
+ .pdu_len = sizeof(get_input_1011),
+ .qualifier = 0x03,
+ .text = "Enter Hello",
+ .response_length = {
+ .min = 2,
+ .max = 2
+ }
+};
+
+static struct get_input_test get_input_data_1021 = {
+ .pdu = get_input_1021,
+ .pdu_len = sizeof(get_input_1021),
+ .qualifier = 0x03,
+ .text = "Enter Hello",
+ .response_length = {
+ .min = 5,
+ .max = 0xFF
+ }
+};
+
+static struct get_input_test get_input_data_1111 = {
+ .pdu = get_input_1111,
+ .pdu_len = sizeof(get_input_1111),
+ .qualifier = 0x01,
+ .text = "ル",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ }
+};
+
+static struct get_input_test get_input_data_1121 = {
+ .pdu = get_input_1121,
+ .pdu_len = sizeof(get_input_1121),
+ .qualifier = 0x01,
+ .text = "ルルルルルルルルルルルルルルルルルルルル"
+ "ルルルルルルルルルルルルルルルルルルルル"
+ "ルルルルルルルルルルルルルルルルルルルル"
+ "ルルルルルルルルルル",
+ .response_length = {
+ .min = 5,
+ .max = 5
+ }
+};
+
+static struct get_input_test get_input_data_1211 = {
+ .pdu = get_input_1211,
+ .pdu_len = sizeof(get_input_1211),
+ .qualifier = 0x03,
+ .text = "Enter Hello",
+ .response_length = {
+ .min = 2,
+ .max = 2
+ }
+};
+
+static struct get_input_test get_input_data_1221 = {
+ .pdu = get_input_1221,
+ .pdu_len = sizeof(get_input_1221),
+ .qualifier = 0x03,
+ .text = "Enter Hello",
+ .response_length = {
+ .min = 5,
+ .max = 0xFF
+ }
};
/* Defined in TS 102.384 Section 27.22.4.3 */
@@ -1324,18 +2588,16 @@ static void test_get_input(gconstpointer data)
g_assert(command->src == STK_DEVICE_IDENTITY_TYPE_UICC);
g_assert(command->dst == STK_DEVICE_IDENTITY_TYPE_TERMINAL);
- g_assert(command->get_input.text);
-
- g_assert(g_str_equal(test->expected, command->get_input.text));
-
- g_assert(command->get_input.response_length.min == test->min);
- g_assert(command->get_input.response_length.max == test->max);
-
- if (test->icon_id > 0) {
- g_assert(command->get_input.icon_id.id == test->icon_id);
- g_assert(command->get_input.icon_id.qualifier ==
- test->icon_qualifier);
- }
+ if (test->text)
+ g_assert(command->get_input.text);
+ check_text(command->get_input.text, test->text);
+ check_response_length(&command->get_input.response_length,
+ &test->response_length);
+ check_text(command->get_input.default_text, test->default_text);
+ check_icon_id(&command->get_input.icon_id, &test->icon_id);
+ check_text_attr(&command->get_input.text_attribute,
+ &test->text_attribute);
+ check_frame_id(&command->get_input.frame_id, &test->frame_id);
stk_command_free(command);
}
@@ -1590,6 +2852,116 @@ int main(int argc, char **argv)
g_test_add_data_func("/teststk/Get Input 1.1.1",
&get_input_data_111, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 1.2.1",
+ &get_input_data_121, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 1.3.1",
+ &get_input_data_131, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 1.4.1",
+ &get_input_data_141, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 1.5.1",
+ &get_input_data_151, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 1.6.1",
+ &get_input_data_161, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 1.7.1",
+ &get_input_data_171, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 1.8.1",
+ &get_input_data_181, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 1.9.1",
+ &get_input_data_191, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 1.10.1",
+ &get_input_data_1101, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 2.1.1",
+ &get_input_data_211, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 3.1.1",
+ &get_input_data_311, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 3.2.1",
+ &get_input_data_321, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 4.1.1",
+ &get_input_data_411, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 4.2.1",
+ &get_input_data_421, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 5.1.1",
+ &get_input_data_511, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 5.2.1",
+ &get_input_data_521, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 6.1.1",
+ &get_input_data_611, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 6.2.1",
+ &get_input_data_621, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 6.3.1",
+ &get_input_data_631, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 6.4.1",
+ &get_input_data_641, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 7.1.1",
+ &get_input_data_711, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.1.1",
+ &get_input_data_811, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.1.2",
+ &get_input_data_812, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.2.1",
+ &get_input_data_821, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.2.2",
+ &get_input_data_822, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.3.1",
+ &get_input_data_831, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.3.2",
+ &get_input_data_832, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.4.1",
+ &get_input_data_841, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.4.2",
+ &get_input_data_842, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.4.3",
+ &get_input_data_843, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.5.1",
+ &get_input_data_851, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.5.2",
+ &get_input_data_852, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.5.3",
+ &get_input_data_853, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.6.1",
+ &get_input_data_861, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.6.2",
+ &get_input_data_862, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.6.3",
+ &get_input_data_863, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.7.1",
+ &get_input_data_871, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.7.2",
+ &get_input_data_872, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.7.3",
+ &get_input_data_873, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.8.1",
+ &get_input_data_881, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.8.2",
+ &get_input_data_882, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.8.3",
+ &get_input_data_883, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.9.1",
+ &get_input_data_891, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.9.2",
+ &get_input_data_892, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.9.3",
+ &get_input_data_893, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.10.1",
+ &get_input_data_8101, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 8.10.2",
+ &get_input_data_8102, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 9.1.1",
+ &get_input_data_911, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 9.2.1",
+ &get_input_data_921, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 10.1.1",
+ &get_input_data_1011, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 10.2.1",
+ &get_input_data_1021, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 11.1.1",
+ &get_input_data_1111, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 11.2.1",
+ &get_input_data_1121, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 12.1.1",
+ &get_input_data_1211, test_get_input);
+ g_test_add_data_func("/teststk/Get Input 12.2.1",
+ &get_input_data_1221, test_get_input);
g_test_add_data_func("/teststk/More Time 1.1.1",
&more_time_data_111, test_more_time);