html text attribute patches
cover html text attribute patches
Changed from last version:
* incorporated feedback from latest review
* dropped invalid test from html text attributes unit test
Kristen Carlson Accardi (9):
stkutil: display text attributes as html
test-stkutil: add unit test for html text attributes
test-stkutil: add html attribute test for Display Text tests
test-stkutil: add html attribute tests for get_inkey_test
test-stkutil: add html attribute tests for get_input_test
test-stkutil: add html attribute tests for play_tone_test
test-stkutil: add html attribute test for setup_menu_test
test-stkutil: add html attribute test for select_item_test
test-stkutil: add html attribute tests for setup idle mode tests
src/stkutil.c | 225 +++++++++++++++ src/stkutil.h | 2 + unit/test-stkutil.c | 765 ++++++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 900 insertions(+), 92 deletions(-)
PATCH 1/9 stkutil: display text attributes as html
--- src/stkutil.c | 225 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/stkutil.h | 2 + 2 files changed, 227 insertions(+), 0 deletions(-)
src/stkutil.c +225 -0
@@ -5853,3 +5853,228 @@ const unsigned char *stk_pdu_from_envelope(const struct stk_envelope *envelope,return pdu; } + +static const char *html_colors[] = { +"#000000" ,/* Black */ +"#808080" ,/* Dark Grey */ +"#C11B17" ,/* Dark Red */ +"#FBB117" ,/* Dark Yellow */ +"#347235" ,/* Dark Green */ +"#307D7E" ,/* Dark Cyan */ +"#0000A0" ,/* Dark Blue */ +"#C031C7" ,/* Dark Magenta */ +"#C0C0C0" ,/* Grey */ +"#FFFFFF" ,/* White */ +"#FF0000" ,/* Bright Red */ +"#FFFF00" ,/* Bright Yellow */ +"#00FF00" ,/* Bright Green */ +"#00FFFF" ,/* Bright Cyan */ +"#0000FF" ,/* Bright Blue */ +"#FF00FF" ,/* Bright Magenta */ +}; + +#define STK_TEXT_FORMAT_ALIGN_MASK 0x03 +#define STK_TEXT_FORMAT_FONT_MASK 0x0C +#define STK_TEXT_FORMAT_STYLE_MASK 0xF0 +#define STK_DEFAULT_TEXT_ALIGNMENT 0x00 +#define STK_TEXT_FORMAT_INIT 0x9003 + +/* Defined in ETSI 123 40 9.2.3.24.10.1.1 */ +enum stk_text_format_code { +STK_TEXT_FORMAT_LEFT_ALIGN =0x00 , +STK_TEXT_FORMAT_CENTER_ALIGN =0x01 , +STK_TEXT_FORMAT_RIGHT_ALIGN =0x02 , +STK_TEXT_FORMAT_NO_ALIGN =0x03 , +STK_TEXT_FORMAT_FONT_SIZE_LARGE =0x04 , +STK_TEXT_FORMAT_FONT_SIZE_SMALL =0x08 , +STK_TEXT_FORMAT_FONT_SIZE_RESERVED =0x0c , +STK_TEXT_FORMAT_STYLE_BOLD =0x10 , +STK_TEXT_FORMAT_STYLE_ITALIC =0x20 , +STK_TEXT_FORMAT_STYLE_UNDERLINED =0x40 , +STK_TEXT_FORMAT_STYLE_STRIKETHROUGH =0x80 , +}; + +static void end_format (GString *string,guint16 attr) +{ +guint code = attr &0xFF ; +guint color = (attr >>8 ) &0xFF ; + +if ((code & ~STK_TEXT_FORMAT_ALIGN_MASK ) || color) +g_string_append (string,"</span>" ); + +if ((code &STK_TEXT_FORMAT_ALIGN_MASK ) !=STK_TEXT_FORMAT_NO_ALIGN ) +g_string_append (string,"</div>" ); +} + +static void start_format (GString *string,guint16 attr) +{ +guint8 code = attr &0xFF ; +guint8 color = (attr >>8 ) &0xFF ; +guint8 align = code &STK_TEXT_FORMAT_ALIGN_MASK ; +guint8 font = code &STK_TEXT_FORMAT_FONT_MASK ; +guint8 style = code &STK_TEXT_FORMAT_STYLE_MASK ; +int fg = color &0x0f ; +int bg = (color >>4 ) &0x0f ; + +/* align formatting applies to a block of text */ +if (align !=STK_TEXT_FORMAT_NO_ALIGN ) +g_string_append (string,"<div style=\"" ); + +switch (align) { +case STK_TEXT_FORMAT_RIGHT_ALIGN : +g_string_append (string,"text-align: right;\">" ); +break ; +case STK_TEXT_FORMAT_CENTER_ALIGN : +g_string_append (string,"text-align: center;\">" ); +break ; +case STK_TEXT_FORMAT_LEFT_ALIGN : +g_string_append (string,"text-align: left;\">" ); +break ; + } + +if ((font ==0 ) && (style ==0 ) && (color ==0 )) +return ; + +/* font, style, and color are inline */ +g_string_append (string,"<span style=\"" ); + +switch (font) { +case STK_TEXT_FORMAT_FONT_SIZE_LARGE : +g_string_append (string,"font-size: big;" ); +break ; +case STK_TEXT_FORMAT_FONT_SIZE_SMALL : +g_string_append (string,"font-size: small;" ); +break ; + } + +if (style &STK_TEXT_FORMAT_STYLE_BOLD ) +g_string_append (string,"font-weight: bold;" ); +if (style &STK_TEXT_FORMAT_STYLE_ITALIC ) +g_string_append (string,"font-style: italic;" ); +if (style &STK_TEXT_FORMAT_STYLE_UNDERLINED ) +g_string_append (string,"text-decoration: underline;" ); +if (style &STK_TEXT_FORMAT_STYLE_STRIKETHROUGH ) +g_string_append (string,"text-decoration: line-through;" ); + +/* add any color */ +if (fg) +g_string_append_printf (string,"color: %s;" , html_colors[fg]); +if (bg) +g_string_append_printf (string,"background-color: %s;" , + html_colors[bg]); +g_string_append (string,"\">" ); +} + +char *stk_text_to_html (const char *utf8, +const unsigned short *attrs,int num_attrs) +{ +long text_len =g_utf8_strlen (utf8,-1 ); +GString *string =g_string_sized_new (strlen (utf8) +1 ); +short *formats; +int pos, i, j; +guint16 start, end, len, attr, prev_attr; +guint8 code, color, align; +const char *text = utf8; +int attrs_len = num_attrs *4 ; + + formats =g_try_new0 (gint16, (text_len +1 )); +if (formats ==NULL ) { +g_string_free (string, TRUE); +return NULL ; + } + +/* we will need formatting at the position beyond the last char */ +for (i =0 ; i <= text_len; i++) + formats[i] =STK_TEXT_FORMAT_INIT ; + +for (i =0 ; i < attrs_len; i +=4 ) { + start = attrs[i]; + len = attrs[i +1 ]; + code = attrs[i +2 ] &0xFF ; + color = attrs[i +3 ] &0xFF ; + +if (len ==0 ) + end = text_len; +else + end = start + len; + +/* sanity check values */ +if (start > end || end > text_len) +continue ; + +/* +* if the alignment is the same as either the default +* or the last alignment used, don't set any alignment +* value. +*/ +if (start ==0 ) + align =STK_TEXT_FORMAT_NO_ALIGN ; +else { + align = formats[start -1 ] & +STK_TEXT_FORMAT_ALIGN_MASK ; + } + +if ((code &STK_TEXT_FORMAT_ALIGN_MASK ) == align) + code |=STK_TEXT_FORMAT_NO_ALIGN ; + + attr = code | (color <<8 ); + +for (j = start; j < end; j++) + formats[j] = attr; + } + + prev_attr =STK_TEXT_FORMAT_INIT ; + +for (pos =0 ; pos <= text_len; pos++) { + attr = formats[pos]; +if (attr != prev_attr) { +if (prev_attr !=STK_TEXT_FORMAT_INIT ) +end_format (string, prev_attr); + +if (attr !=STK_TEXT_FORMAT_INIT ) +start_format (string, attr); + + prev_attr = attr; + } + +if (pos == text_len) +break ; + +switch (g_utf8_get_char (text)) { +case '\n' : +g_string_append (string,"<br/>" ); +break ; +case '\r' : + { +char *next =g_utf8_next_char (text); +gunichar c =g_utf8_get_char (next); + +g_string_append (string,"<br/>" ); + +if ((pos +1 < text_len) && (c =='\n' )) { + text =g_utf8_next_char (text); + pos++; + } +break ; + } +case '<' : +g_string_append (string,"<" ); +break ; +case '>' : +g_string_append (string,">" ); +break ; +case '&' : +g_string_append (string,"&" ); +break ; +default : +g_string_append_unichar (string,g_utf8_get_char (text)); + } + + text =g_utf8_next_char (text); + } + +g_free (formats); + +/* return characters from string. Caller must free char data */ +return g_string_free (string, FALSE); +}
src/stkutil.h +2 -0
@@ -1642,3 +1642,5 @@ const unsigned char *stk_pdu_from_response(const struct stk_response *response, unsigned int *out_length);const unsigned char *stk_pdu_from_envelope (const struct stk_envelope *envelope,unsigned int *out_length); +char *stk_text_to_html (const char *text, +const unsigned short *attrs,int num_attrs);
Signature · 1 line
1.6.6.1
Re: [PATCH 1/9] stkutil: display text attributes as html
Hi Kristen,
src/stkutil.c const unsigned char *stk_pdu_from_envelope(const struct stk_envelope *envelope, · line 5964
Quoted 6 lines
src/stkutil.c +6
-0+/* add any color */ +if (fg) +g_string_append_printf (string,"color: %s;" , html_colors[fg]); +if (bg) +g_string_append_printf (string,"background-color: %s;" , + html_colors[bg]);
I applied the patch however I changed this part afterward. Black background / foreground should still be set explicitly.
Regards,
-Denis
PATCH 2/9 test-stkutil: add unit test for html text attributes
In reply to Kristen Carlson Accardi--- unit/test-stkutil.c | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 96 insertions(+), 0 deletions(-)
unit/test-stkutil.c +96 -0
@@ -478,6 +478,29 @@ static inline void check_cdma_sms_tpdu(check_common_byte_array (command, test); } +static void check_text_attr_html (const struct stk_text_attribute *test, +char *text,const char *expected_html) +{ +char *html; +unsigned short attrs[256 ]; +int i; + +if (expected_html ==NULL ) +return ; + +for (i =0 ; i < test->len; i +=4 ) { + attrs[i] = test->attributes[i]; + attrs[i +1 ] = test->attributes[i +1 ]; + attrs[i +2 ] = test->attributes[i +2 ]; + attrs[i +3 ] = test->attributes[i +3 ]; + } + html =stk_text_to_html (text, attrs, test->len /4 ); + +g_assert (memcmp (html, expected_html,strlen (expected_html)) ==0 ); + +g_free (html); +} +/* Defined in TS 102.223 Section 8.72 */ static void check_text_attr (const struct stk_text_attribute *command,const struct stk_text_attribute *test)
@@ -22139,6 +22162,70 @@ static const struct envelope_test timer_expiration_data_221a = { }, }; +struct html_attr_test { +char *text; +struct stk_text_attribute text_attr; +char *html; +}; + +static struct html_attr_test html_attr_data_1 = { + .text ="Blue green green green" , + .text_attr = { + .len =8 , + .attributes = {0x00 ,0x00 ,0x03 ,0x94 ,0x00 ,0x04 ,0x03 , +0x96 }, + }, + .html ="<span style=\"color: #0000A0;background-color: #FFFFFF;\">" +"Blue</span><span style=\"color: #347235;background-color: " +"#FFFFFF;\"> green green green</span>" , +}; + +static struct html_attr_test html_attr_data_2 = { + .text ="abc" , + .text_attr = { + .len =8 , + .attributes = {0x00 ,0x02 ,0x03 ,0x94 ,0x01 ,0x02 ,0x03 , +0x96 }, + }, + .html ="<span style=\"color: #347235;background-color: #FFFFFF;\">" +"a</span><span style=\"color: #0000A0;background-color: " +"#FFFFFF;\">bc</span>" , +}; + +static struct html_attr_test html_attr_data_3 = { + .text ="1 < 2, 2 > 1, 1 & 0 == 0\nSpecial Chars are Fun\r\nTo Write" , + .text_attr = { + .len =4 , + .attributes = {0x00 ,0x00 ,0x03 ,0x00 }, + }, + .html ="1 < 2, 2 > 1, 1 & 0 == 0<br/>Special Chars are Fun" +"<br/>To Write" , +}; + +static struct html_attr_test html_attr_data_4 = { + .text ="€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€" +"€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€" +"€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€" +"€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€" +"€€€€€€€€€€€€€€€" , + .text_attr = { + .len =4 , + .attributes = {0x00 ,0x00 ,0x03 ,0x94 }, + }, + .html ="<span style=\"color: #347235;background-color: #FFFFFF;\">" +"€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€" +"€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€" +"€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€" +"€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€" +"€€€€€€€€€€€€€€€</span>" , +}; + +static void test_html_attr (gconstpointer data) +{ +const struct html_attr_test *test = data; +check_text_attr_html (&test->text_attr, test->text, test->html); +} +int main (int argc,char **argv) {g_test_init (&argc, &argv,NULL );
@@ -24146,5 +24233,14 @@ int main(int argc, char **argv)g_test_add_data_func ("/teststk/Timer Expiration 2.2.1A" , &timer_expiration_data_221a, test_envelope_encoding); +g_test_add_data_func ("/teststk/HTML Attribute Test 1" , + &html_attr_data_1, test_html_attr); +g_test_add_data_func ("/teststk/HTML Attribute Test 2" , + &html_attr_data_2, test_html_attr); +g_test_add_data_func ("/teststk/HTML Attribute Test 3" , + &html_attr_data_3, test_html_attr); +g_test_add_data_func ("/teststk/HTML Attribute Test 4" , + &html_attr_data_4, test_html_attr); +return g_test_run (); }
Signature · 1 line
1.6.6.1
Re: [PATCH 2/9] test-stkutil: add unit test for html text attributes
Hi Kristen,
Quoted 4 lines · Kristen Carlson Accardi
--- unit/test-stkutil.c | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 96 insertions(+), 0 deletions(-)
All other patches in this series have been applied. Thanks.
Regards,
-Denis
PATCH 3/9 test-stkutil: add html attribute test for Display Text tests
In reply to Kristen Carlson Accardi--- unit/test-stkutil.c | 211 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 211 insertions(+), 0 deletions(-)
unit/test-stkutil.c +211 -0
@@ -537,6 +537,7 @@ struct display_text_test {struct stk_duration duration;struct stk_text_attribute text_attr;struct stk_frame_id frame_id; +const char *html; };unsigned char display_text_111[] = {0xD0 ,0x1A ,0x81 ,0x03 ,0x01 ,0x21 ,0x80 ,
@@ -632,6 +633,69 @@ unsigned char display_text_711[] = { 0xD0, 0x19, 0x81, 0x03, 0x01, 0x21, 0x80,0x63 ,0x6F ,0x6E ,0x64 ,0x84 ,0x02 , 0x01, 0x0A }; +unsigned char display_text_811[] = {0xD0 ,0x22 ,0x81 ,0x03 ,0x01 ,0x21 ,0x80 , +0x82 ,0x02 ,0x81 ,0x02 ,0x8D ,0x11 , +0x04 ,0x54 ,0x65 ,0x78 ,0x74 ,0x20 , +0x41 ,0x74 ,0x74 ,0x72 ,0x69 ,0x62 , +0x75 ,0x74 ,0x65 ,0x20 ,0x31 ,0xD0 , +0x04 ,0x00 ,0x10 ,0x00 ,0xB4 }; + +unsigned char display_text_821[] = {0xD0 ,0x22 ,0x81 ,0x03 ,0x01 ,0x21 ,0x80 , +0x82 ,0x02 ,0x81 ,0x02 ,0x8D ,0x11 , +0x04 ,0x54 ,0x65 ,0x78 ,0x74 ,0x20 , +0x41 ,0x74 ,0x74 ,0x72 ,0x69 ,0x62 , +0x75 ,0x74 ,0x65 ,0x20 ,0x31 ,0xD0 , +0x04 ,0x00 ,0x10 ,0x01 ,0xB4 }; + +unsigned char display_text_831[] = {0xD0 ,0x22 ,0x81 ,0x03 ,0x01 ,0x21 ,0x80 , +0x82 ,0x02 ,0x81 ,0x02 ,0x8D ,0x11 , +0x04 ,0x54 ,0x65 ,0x78 ,0x74 ,0x20 , +0x41 ,0x74 ,0x74 ,0x72 ,0x69 ,0x62 , +0x75 ,0x74 ,0x65 ,0x20 ,0x31 ,0xD0 , +0x04 ,0x00 ,0x10 ,0x02 ,0xB4 }; + +unsigned char display_text_841[] = {0xD0 ,0x22 ,0x81 ,0x03 ,0x01 ,0x21 ,0x80 , +0x82 ,0x02 ,0x81 ,0x02 ,0x8D ,0x11 , +0x04 ,0x54 ,0x65 ,0x78 ,0x74 ,0x20 , +0x41 ,0x74 ,0x74 ,0x72 ,0x69 ,0x62 , +0x75 ,0x74 ,0x65 ,0x20 ,0x31 ,0xD0 , +0x04 ,0x00 ,0x10 ,0x04 ,0xB4 }; + +unsigned char display_text_851[] = {0xD0 ,0x22 ,0x81 ,0x03 ,0x01 ,0x21 ,0x80 , +0x82 ,0x02 ,0x81 ,0x02 ,0x8D ,0x11 , +0x04 ,0x54 ,0x65 ,0x78 ,0x74 ,0x20 , +0x41 ,0x74 ,0x74 ,0x72 ,0x69 ,0x62 , +0x75 ,0x74 ,0x65 ,0x20 ,0x31 ,0xD0 , +0x04 ,0x00 ,0x10 ,0x08 ,0xB4 }; + +unsigned char display_text_861[] = {0xD0 ,0x22 ,0x81 ,0x03 ,0x01 ,0x21 ,0x80 , +0x82 ,0x02 ,0x81 ,0x02 ,0x8D ,0x11 , +0x04 ,0x54 ,0x65 ,0x78 ,0x74 ,0x20 , +0x41 ,0x74 ,0x74 ,0x72 ,0x69 ,0x62 , +0x75 ,0x74 ,0x65 ,0x20 ,0x31 ,0xD0 , +0x04 ,0x00 ,0x10 ,0x10 ,0xB4 }; + +unsigned char display_text_871[] = {0xD0 ,0x22 ,0x81 ,0x03 ,0x01 ,0x21 ,0x80 , +0x82 ,0x02 ,0x81 ,0x02 ,0x8D ,0x11 , +0x04 ,0x54 ,0x65 ,0x78 ,0x74 ,0x20 , +0x41 ,0x74 ,0x74 ,0x72 ,0x69 ,0x62 , +0x75 ,0x74 ,0x65 ,0x20 ,0x31 ,0xD0 , +0x04 ,0x00 ,0x10 ,0x20 ,0xB4 }; + +unsigned char display_text_881[] = {0xD0 ,0x22 ,0x81 ,0x03 ,0x01 ,0x21 ,0x80 , +0x82 ,0x02 ,0x81 ,0x02 ,0x8D ,0x11 , +0x04 ,0x54 ,0x65 ,0x78 ,0x74 ,0x20 , +0x41 ,0x74 ,0x74 ,0x72 ,0x69 ,0x62 , +0x75 ,0x74 ,0x65 ,0x20 ,0x31 ,0xD0 , +0x04 ,0x00 ,0x10 ,0x40 ,0xB4 }; + +unsigned char display_text_891[] = {0xD0 ,0x22 ,0x81 ,0x03 ,0x01 ,0x21 ,0x80 , +0x82 ,0x02 ,0x81 ,0x02 ,0x8D ,0x11 , +0x04 ,0x54 ,0x65 ,0x78 ,0x74 ,0x20 , +0x41 ,0x74 ,0x74 ,0x72 ,0x69 ,0x62 , +0x75 ,0x74 ,0x65 ,0x20 ,0x31 ,0xD0 , +0x04 ,0x00 ,0x10 ,0x80 ,0xB4 }; +unsigned char display_text_911[] = {0xD0 ,0x10 ,0x81 ,0x03 ,0x01 ,0x21 ,0x80 ,0x82 ,0x02 ,0x81 ,0x02 ,0x8D ,0x05 ,0x08 ,0x4F ,0x60 ,0x59 ,0x7D };
@@ -737,6 +801,132 @@ static struct display_text_test display_text_data_711 = { } }; +static struct display_text_test display_text_data_811 = { + .pdu = display_text_811, + .pdu_len =sizeof (display_text_811), + .qualifier =0x80 , + .text ="Text Attribute 1" , + .text_attr = { + .len =4 , + .attributes = {0x00 ,0x10 ,0x00 ,0xB4 }, + }, + .html ="<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Text Attribute 1</span>" +"</div>" , +}; + +static struct display_text_test display_text_data_821 = { + .pdu = display_text_821, + .pdu_len =sizeof (display_text_821), + .qualifier =0x80 , + .text ="Text Attribute 1" , + .text_attr = { + .len =4 , + .attributes = {0x00 ,0x10 ,0x01 ,0xB4 }, + }, + .html ="<div style=\"text-align: center;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Text Attribute 1</span>" +"</div>" , +}; + +static struct display_text_test display_text_data_831 = { + .pdu = display_text_831, + .pdu_len =sizeof (display_text_831), + .qualifier =0x80 , + .text ="Text Attribute 1" , + .text_attr = { + .len =4 , + .attributes = {0x00 ,0x10 ,0x02 ,0xB4 }, + }, + .html ="<div style=\"text-align: right;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Text Attribute 1</span>" +"</div>" , +}; + +static struct display_text_test display_text_data_841 = { + .pdu = display_text_841, + .pdu_len =sizeof (display_text_841), + .qualifier =0x80 , + .text ="Text Attribute 1" , + .text_attr = { + .len =4 , + .attributes = {0x00 ,0x10 ,0x04 ,0xB4 }, + }, + .html ="<div style=\"text-align: left;\"><span style=\"font-size: " +"big;color: #347235;background-color: #FFFF00;\">" +"Text Attribute 1</span></div>" , +}; + +static struct display_text_test display_text_data_851 = { + .pdu = display_text_851, + .pdu_len =sizeof (display_text_851), + .qualifier =0x80 , + .text ="Text Attribute 1" , + .text_attr = { + .len =4 , + .attributes = {0x00 ,0x10 ,0x08 ,0xB4 }, + }, + .html ="<div style=\"text-align: left;\"><span style=\"font-size: " +"small;color: #347235;background-color: #FFFF00;\">" +"Text Attribute 1</span></div>" , +}; + +static struct display_text_test display_text_data_861 = { + .pdu = display_text_861, + .pdu_len =sizeof (display_text_861), + .qualifier =0x80 , + .text ="Text Attribute 1" , + .text_attr = { + .len =4 , + .attributes = {0x00 ,0x10 ,0x10 ,0xB4 }, + }, + .html ="<div style=\"text-align: left;\"><span style=\"font-weight: " +"bold;color: #347235;background-color: #FFFF00;\">" +"Text Attribute 1</span></div>" , +}; + +static struct display_text_test display_text_data_871 = { + .pdu = display_text_871, + .pdu_len =sizeof (display_text_871), + .qualifier =0x80 , + .text ="Text Attribute 1" , + .text_attr = { + .len =4 , + .attributes = {0x00 ,0x10 ,0x20 ,0xB4 }, + }, + .html ="<div style=\"text-align: left;\"><span style=\"font-style: " +"italic;color: #347235;background-color: #FFFF00;\">" +"Text Attribute 1</span>" , +}; + +static struct display_text_test display_text_data_881 = { + .pdu = display_text_881, + .pdu_len =sizeof (display_text_881), + .qualifier =0x80 , + .text ="Text Attribute 1" , + .text_attr = { + .len =4 , + .attributes = {0x00 ,0x10 ,0x40 ,0xB4 }, + }, + .html ="<div style=\"text-align: left;\"><span style=\"" +"text-decoration: underline;color: #347235;" +"background-color: #FFFF00;\">Text Attribute 1</span></div>" , +}; + +static struct display_text_test display_text_data_891 = { + .pdu = display_text_891, + .pdu_len =sizeof (display_text_891), + .qualifier =0x80 , + .text ="Text Attribute 1" , + .text_attr = { + .len =4 , + .attributes = {0x00 ,0x10 ,0x80 ,0xB4 }, + }, + .html ="<div style=\"text-align: left;\"><span style=\"" +"text-decoration: line-through;color: #347235;" +"background-color: #FFFF00;\">Text Attribute 1</span>" , +}; +static struct display_text_test display_text_data_911 = { .pdu = display_text_911, .pdu_len =sizeof (display_text_911),
@@ -777,6 +967,9 @@ static void test_display_text(gconstpointer data)check_duration (&command->display_text.duration, &test->duration);check_text_attr (&command->display_text.text_attr, &test->text_attr); +check_text_attr_html (&command->display_text.text_attr, + command->display_text.text, + test->html);check_frame_id (&command->display_text.frame_id, &test->frame_id);stk_command_free (command);
@@ -22252,6 +22445,24 @@ int main(int argc, char **argv) &display_text_data_611, test_display_text);g_test_add_data_func ("/teststk/Display Text 7.1.1" , &display_text_data_711, test_display_text); +g_test_add_data_func ("/teststk/Display Text 8.1.1" , + &display_text_data_811, test_display_text); +g_test_add_data_func ("/teststk/Display Text 8.2.1" , + &display_text_data_821, test_display_text); +g_test_add_data_func ("/teststk/Display Text 8.3.1" , + &display_text_data_831, test_display_text); +g_test_add_data_func ("/teststk/Display Text 8.4.1" , + &display_text_data_841, test_display_text); +g_test_add_data_func ("/teststk/Display Text 8.5.1" , + &display_text_data_851, test_display_text); +g_test_add_data_func ("/teststk/Display Text 8.6.1" , + &display_text_data_861, test_display_text); +g_test_add_data_func ("/teststk/Display Text 8.7.1" , + &display_text_data_871, test_display_text); +g_test_add_data_func ("/teststk/Display Text 8.8.1" , + &display_text_data_881, test_display_text); +g_test_add_data_func ("/teststk/Display Text 8.9.1" , + &display_text_data_891, test_display_text);g_test_add_data_func ("/teststk/Display Text 9.1.1" , &display_text_data_911, test_display_text); g_test_add_data_func("/teststk/Display Text 10.1.1",
Signature · 1 line
1.6.6.1
PATCH 4/9 test-stkutil: add html attribute tests for get_inkey_test
In reply to Kristen Carlson Accardi--- unit/test-stkutil.c | 75 ++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 59 insertions(+), 16 deletions(-)
unit/test-stkutil.c +59 -16
@@ -984,6 +984,7 @@ struct get_inkey_test {struct stk_duration duration;struct stk_text_attribute text_attr;struct stk_frame_id frame_id; +char *html; };static unsigned char get_inkey_111[] = {0xD0 ,0x15 ,0x81 ,0x03 ,0x01 ,0x22 ,
@@ -1589,7 +1590,9 @@ static struct get_inkey_test get_inkey_data_911 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x09, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " + "#347235;background-color: #FFFF00;\">Enter \"+\"</span></div>", }; static struct get_inkey_test get_inkey_data_912 = {
@@ -1607,7 +1610,10 @@ static struct get_inkey_test get_inkey_data_921 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x09, 0x01, 0xB4 } - } + }, + .html = "<div style=\"text-align: center;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Enter \"+\"</span>" + "</div>", };static struct get_inkey_test get_inkey_data_922 = {
@@ -1625,7 +1631,10 @@ static struct get_inkey_test get_inkey_data_931 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x09, 0x02, 0xB4 } - } + }, + .html = "<div style=\"text-align: right;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Enter \"+\"</span>" + "</div>", };static struct get_inkey_test get_inkey_data_932 = {
@@ -1643,7 +1652,10 @@ static struct get_inkey_test get_inkey_data_941 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x09, 0x04, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-size: " +"big;color: #347235;background-color: #FFFF00;\">Enter \"+\"" + "</span></div>", };static struct get_inkey_test get_inkey_data_942 = {
@@ -1654,7 +1666,9 @@ static struct get_inkey_test get_inkey_data_942 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x09, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " + "#347235;background-color: #FFFF00;\">Enter \"#\"</span></div>", }; static struct get_inkey_test get_inkey_data_943 = {
@@ -1672,7 +1686,10 @@ static struct get_inkey_test get_inkey_data_951 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x09, 0x08, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-size: " +"small;color: #347235;background-color: #FFFF00;\">" + "Enter \"+\"</span></div>", };static struct get_inkey_test get_inkey_data_952 = {
@@ -1683,7 +1700,9 @@ static struct get_inkey_test get_inkey_data_952 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x09, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " + "#347235;background-color: #FFFF00;\">Enter \"#\"</span></div>", }; static struct get_inkey_test get_inkey_data_953 = {
@@ -1701,7 +1720,10 @@ static struct get_inkey_test get_inkey_data_961 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x09, 0x10, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-weight: " +"bold;color: #347235;background-color: #FFFF00;\">Enter \"+\"" + "</span></div>", };static struct get_inkey_test get_inkey_data_962 = {
@@ -1712,7 +1734,9 @@ static struct get_inkey_test get_inkey_data_962 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x09, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " + "#347235;background-color: #FFFF00;\">Enter \"#\"</span></div>", }; static struct get_inkey_test get_inkey_data_963 = {
@@ -1730,7 +1754,10 @@ static struct get_inkey_test get_inkey_data_971 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x09, 0x20, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-style: " +"italic;color: #347235;background-color: #FFFF00;\">" + "Enter \"+\"</span></div>", };static struct get_inkey_test get_inkey_data_972 = {
@@ -1741,7 +1768,9 @@ static struct get_inkey_test get_inkey_data_972 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x09, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " + "#347235;background-color: #FFFF00;\">Enter \"#\"</span></div>", }; static struct get_inkey_test get_inkey_data_973 = {
@@ -1759,7 +1788,10 @@ static struct get_inkey_test get_inkey_data_981 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x09, 0x40, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"" +"text-decoration: underline;color: #347235;" + "background-color: #FFFF00;\">Enter \"+\"</span></div>", };static struct get_inkey_test get_inkey_data_982 = {
@@ -1770,7 +1802,9 @@ static struct get_inkey_test get_inkey_data_982 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x09, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " + "#347235;background-color: #FFFF00;\">Enter \"#\"</span></div>", }; static struct get_inkey_test get_inkey_data_983 = {
@@ -1788,7 +1822,10 @@ static struct get_inkey_test get_inkey_data_991 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x09, 0x80, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"" +"text-decoration: line-through;color: #347235;" + "background-color: #FFFF00;\">Enter \"+\"</span></div>", };static struct get_inkey_test get_inkey_data_992a = {
@@ -1799,7 +1836,9 @@ static struct get_inkey_test get_inkey_data_992a = { .text_attr = { .len = 4, .attributes = { 0x00, 0x09, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " + "#347235;background-color: #FFFF00;\">Enter \"#\"</span></div>", }; static struct get_inkey_test get_inkey_data_992b = {
@@ -1824,7 +1863,9 @@ static struct get_inkey_test get_inkey_data_9101 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x09, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " + "#347235;background-color: #FFFF00;\">Enter \"+\"</span></div>", }; static struct get_inkey_test get_inkey_data_9102 = {
@@ -1906,6 +1947,8 @@ static void test_get_inkey(gconstpointer data)check_duration (&command->get_inkey.duration, &test->duration);check_text_attr (&command->get_inkey.text_attr, &test->text_attr); +check_text_attr_html (&command->get_inkey.text_attr, + command->get_inkey.text, test->html);check_frame_id (&command->get_inkey.frame_id, &test->frame_id);stk_command_free (command);
Signature · 1 line
1.6.6.1
PATCH 5/9 test-stkutil: add html attribute tests for get_input_test
In reply to Kristen Carlson Accardi--- unit/test-stkutil.c | 75 ++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 59 insertions(+), 16 deletions(-)
unit/test-stkutil.c +59 -16
@@ -1964,6 +1964,7 @@ struct get_input_test {struct stk_icon_id icon_id;struct stk_text_attribute text_attr;struct stk_frame_id frame_id; +char *html; };static unsigned char get_input_111[] = {0xD0 ,0x1B ,0x81 ,0x03 ,0x01 ,0x23 ,
@@ -2799,7 +2800,9 @@ static struct get_input_test get_input_data_811 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x0B, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Enter 12345</span></div>" };static struct get_input_test get_input_data_812 = {
@@ -2825,7 +2828,10 @@ static struct get_input_test get_input_data_821 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x0B, 0x01, 0xB4 } - } + }, + .html = "<div style=\"text-align: center;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Enter 12345</span>" + "</div>", };static struct get_input_test get_input_data_822 = {
@@ -2851,7 +2857,10 @@ static struct get_input_test get_input_data_831 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x0B, 0x02, 0xB4 } - } + }, + .html = "<div style=\"text-align: right;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Enter 12345</span>" + "</div>", };static struct get_input_test get_input_data_832 = {
@@ -2877,7 +2886,10 @@ static struct get_input_test get_input_data_841 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x0B, 0x04, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-size: " +"big;color: #347235;background-color: #FFFF00;\">Enter 12345" + "</span></div>", };static struct get_input_test get_input_data_842 = {
@@ -2892,7 +2904,9 @@ static struct get_input_test get_input_data_842 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x0B, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Enter 22222</span></div>" };static struct get_input_test get_input_data_843 = {
@@ -2918,7 +2932,10 @@ static struct get_input_test get_input_data_851 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x0B, 0x08, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-size: " +"small;color: #347235;background-color: #FFFF00;\">Enter " + "12345</span></div>", };static struct get_input_test get_input_data_852 = {
@@ -2933,7 +2950,9 @@ static struct get_input_test get_input_data_852 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x0B, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " + "#347235;background-color: #FFFF00;\">Enter 22222</span></div>", }; static struct get_input_test get_input_data_853 = {
@@ -2959,7 +2978,10 @@ static struct get_input_test get_input_data_861 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x0B, 0x10, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-weight: " +"bold;color: #347235;background-color: #FFFF00;\">Enter " +"12345</span></div>" };static struct get_input_test get_input_data_862 = {
@@ -2974,7 +2996,9 @@ static struct get_input_test get_input_data_862 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x0B, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " + "#347235;background-color: #FFFF00;\">Enter 22222</span></div>", }; static struct get_input_test get_input_data_863 = {
@@ -3000,7 +3024,10 @@ static struct get_input_test get_input_data_871 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x0B, 0x20, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-style: " +"italic;color: #347235;background-color: #FFFF00;\">Enter " + "12345</span></div>", };static struct get_input_test get_input_data_872 = {
@@ -3015,7 +3042,9 @@ static struct get_input_test get_input_data_872 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x0B, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " + "#347235;background-color: #FFFF00;\">Enter 22222</span></div>", }; static struct get_input_test get_input_data_873 = {
@@ -3041,7 +3070,10 @@ static struct get_input_test get_input_data_881 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x0B, 0x40, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span " +"style=\"text-decoration: underline;color: #347235;" + "background-color: #FFFF00;\">Enter 12345</span></div>", };static struct get_input_test get_input_data_882 = {
@@ -3056,7 +3088,9 @@ static struct get_input_test get_input_data_882 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x0B, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " + "#347235;background-color: #FFFF00;\">Enter 22222</span></div>", }; static struct get_input_test get_input_data_883 = {
@@ -3082,7 +3116,10 @@ static struct get_input_test get_input_data_891 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x0B, 0x80, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span " +"style=\"text-decoration: line-through;color: #347235;" + "background-color: #FFFF00;\">Enter 12345</span></div>", };static struct get_input_test get_input_data_892 = {
@@ -3097,7 +3134,9 @@ static struct get_input_test get_input_data_892 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x0B, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " + "#347235;background-color: #FFFF00;\">Enter 22222</span></div>", }; static struct get_input_test get_input_data_893 = {
@@ -3123,7 +3162,9 @@ static struct get_input_test get_input_data_8101 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x0B, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " + "#347235;background-color: #FFFF00;\">Enter 12345</span></div>", }; static struct get_input_test get_input_data_8102 = {
@@ -3257,6 +3298,8 @@ static void test_get_input(gconstpointer data)check_icon_id (&command->get_input.icon_id, &test->icon_id);check_text_attr (&command->get_input.text_attr, &test->text_attr); +check_text_attr_html (&command->get_input.text_attr, + command->get_input.text, test->html);check_frame_id (&command->get_input.frame_id, &test->frame_id);stk_command_free (command);
Signature · 1 line
1.6.6.1
PATCH 6/9 test-stkutil: add html attribute tests for play_tone_test
In reply to Kristen Carlson Accardi--- unit/test-stkutil.c | 82 +++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 66 insertions(+), 16 deletions(-)
unit/test-stkutil.c +66 -16
@@ -3351,6 +3351,7 @@ struct play_tone_test {struct stk_icon_id icon_id;struct stk_text_attribute text_attr;struct stk_frame_id frame_id; +char *html; };static unsigned char play_tone_111[] = {0xD0 ,0x1B ,0x81 ,0x03 ,0x01 ,0x20 ,
@@ -4121,7 +4122,10 @@ static struct play_tone_test play_tone_data_411 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Text Attribute 1</span>" + "</div>", };static struct play_tone_test play_tone_data_412 = {
@@ -4149,7 +4153,10 @@ static struct play_tone_test play_tone_data_421 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x01, 0xB4 } - } + }, + .html = "<div style=\"text-align: center;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Text Attribute 1</span>" + "</div>", };static struct play_tone_test play_tone_data_422 = {
@@ -4177,7 +4184,10 @@ static struct play_tone_test play_tone_data_431 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x02, 0xB4 } - } + }, + .html = "<div style=\"text-align: right;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Text Attribute 1</span>" + "</div>", };static struct play_tone_test play_tone_data_432 = {
@@ -4205,7 +4215,10 @@ static struct play_tone_test play_tone_data_441 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x04, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-size: " +"big;color: #347235;background-color: #FFFF00;\">" + "Text Attribute 1</span></div>", };static struct play_tone_test play_tone_data_442 = {
@@ -4221,7 +4234,10 @@ static struct play_tone_test play_tone_data_442 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Text Attribute 2</span>" + "</div>", };static struct play_tone_test play_tone_data_443 = {
@@ -4249,7 +4265,10 @@ static struct play_tone_test play_tone_data_451 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x08, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-size: " +"small;color: #347235;background-color: #FFFF00;\">" + "Text Attribute 1</span></div>", };static struct play_tone_test play_tone_data_452 = {
@@ -4265,7 +4284,10 @@ static struct play_tone_test play_tone_data_452 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Text Attribute 2</span>" + "</div>", };static struct play_tone_test play_tone_data_453 = {
@@ -4293,7 +4315,10 @@ static struct play_tone_test play_tone_data_461 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x0E, 0x10, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-weight: " +"bold;color: #347235;background-color: #FFFF00;\">" +"Text Attribute</span></div> 1" };static struct play_tone_test play_tone_data_462 = {
@@ -4309,7 +4334,10 @@ static struct play_tone_test play_tone_data_462 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Text Attribute 2</span>" + "</div>", };static struct play_tone_test play_tone_data_463 = {
@@ -4337,7 +4365,10 @@ static struct play_tone_test play_tone_data_471 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x0E, 0x20, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-style: " +"italic;color: #347235;background-color: #FFFF00;\">" + "Text Attribute</span></div> 1", };static struct play_tone_test play_tone_data_472 = {
@@ -4353,7 +4384,10 @@ static struct play_tone_test play_tone_data_472 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Text Attribute 2</span>" + "</div>", };static struct play_tone_test play_tone_data_473 = {
@@ -4381,7 +4415,10 @@ static struct play_tone_test play_tone_data_481 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x40, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span " +"style=\"text-decoration: underline;color: #347235;" + "background-color: #FFFF00;\">Text Attribute 1</span></div>", };static struct play_tone_test play_tone_data_482 = {
@@ -4397,7 +4434,10 @@ static struct play_tone_test play_tone_data_482 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Text Attribute 2</span>" + "</div>", };static struct play_tone_test play_tone_data_483 = {
@@ -4425,7 +4465,10 @@ static struct play_tone_test play_tone_data_491 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x80, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span " +"style=\"text-decoration: line-through;color: #347235;" + "background-color: #FFFF00;\">Text Attribute 1</span></div>", };static struct play_tone_test play_tone_data_492 = {
@@ -4441,7 +4484,10 @@ static struct play_tone_test play_tone_data_492 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Text Attribute 2</span>" + "</div>", };static struct play_tone_test play_tone_data_493 = {
@@ -4469,7 +4515,9 @@ static struct play_tone_test play_tone_data_4101 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " + "#347235;background-color: #FFFF00;\">Text Attribute 1</span>", }; static struct play_tone_test play_tone_data_4102 = {
@@ -4579,6 +4627,8 @@ static void test_play_tone(gconstpointer data)check_duration (&command->play_tone.duration, &test->duration);check_icon_id (&command->play_tone.icon_id, &test->icon_id);check_text_attr (&command->play_tone.text_attr, &test->text_attr); +check_text_attr_html (&command->play_tone.text_attr, + command->play_tone.alpha_id, test->html);check_frame_id (&command->play_tone.frame_id, &test->frame_id);stk_command_free (command);
Signature · 1 line
1.6.6.1
PATCH 7/9 test-stkutil: add html attribute test for setup_menu_test
In reply to Kristen Carlson Accardi--- unit/test-stkutil.c | 59 ++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 47 insertions(+), 12 deletions(-)
unit/test-stkutil.c +47 -12
@@ -4689,6 +4689,7 @@ struct setup_menu_test {struct stk_item_icon_id_list item_icon_id_list;struct stk_text_attribute text_attr;struct stk_item_text_attribute_list item_text_attr_list; +char *html; };static unsigned char setup_menu_111[] = {0xD0 ,0x3B ,0x81 ,0x03 ,0x01 ,0x25 ,
@@ -5503,7 +5504,10 @@ static struct setup_menu_test setup_menu_data_611 = { .len = 12, .list = { 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Toolkit Menu 1</span>" + "</div>", }; static struct setup_menu_test setup_menu_data_612 = {
@@ -5536,7 +5540,10 @@ static struct setup_menu_test setup_menu_data_621 = { .len = 12, .list = { 0x00, 0x06, 0x01, 0xB4, 0x00, 0x06, 0x01, 0xB4, 0x00, 0x06, 0x01, 0xB4 } - } + }, + .html = "<div style=\"text-align: center;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Toolkit Menu 1</span>" +"</div>" }; static struct setup_menu_test setup_menu_data_622 = {
@@ -5573,7 +5580,10 @@ static struct setup_menu_test setup_menu_data_631 = { .len = 12, .list = { 0x00, 0x06, 0x02, 0xB4, 0x00, 0x06, 0x02, 0xB4, 0x00, 0x06, 0x02, 0xB4 } - } + }, + .html = "<div style=\"text-align: right;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Toolkit Menu 1</span>" +"</div>" }; static struct setup_menu_test setup_menu_data_632 = {
@@ -5606,7 +5616,10 @@ static struct setup_menu_test setup_menu_data_641 = { .len = 12, .list = { 0x00, 0x06, 0x04, 0xB4, 0x00, 0x06, 0x04, 0xB4, 0x00, 0x06, 0x04, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-size: " +"big;color: #347235;background-color: #FFFF00;\">" + "Toolkit Menu 1</span></div>", }; static struct setup_menu_test setup_menu_data_642 = {
@@ -5627,7 +5640,10 @@ static struct setup_menu_test setup_menu_data_642 = { .len = 12, .list = { 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Toolkit Menu 2</span>" + "</div>", }; static struct setup_menu_test setup_menu_data_643 = {
@@ -5660,7 +5676,10 @@ static struct setup_menu_test setup_menu_data_651 = { .len = 12, .list = { 0x00, 0x06, 0x08, 0xB4, 0x00, 0x06, 0x08, 0xB4, 0x00, 0x06, 0x08, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-size: " +"small;color: #347235;background-color: #FFFF00;\">" + "Toolkit Menu 1</span></div>", }; static struct setup_menu_test setup_menu_data_661 = {
@@ -5681,7 +5700,10 @@ static struct setup_menu_test setup_menu_data_661 = { .len = 12, .list = { 0x00, 0x06, 0x10, 0xB4, 0x00, 0x06, 0x10, 0xB4, 0x00, 0x06, 0x10, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-weight: " +"bold;color: #347235;background-color: #FFFF00;\">" + "Toolkit Menu 1</span></div>", }; static struct setup_menu_test setup_menu_data_671 = {
@@ -5702,7 +5724,10 @@ static struct setup_menu_test setup_menu_data_671 = { .len = 12, .list = { 0x00, 0x06, 0x20, 0xB4, 0x00, 0x06, 0x20, 0xB4, 0x00, 0x06, 0x20, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-style: " +"italic;color: #347235;background-color: #FFFF00;\">" +"Toolkit Menu 1</span></div>" }; static struct setup_menu_test setup_menu_data_681 = {
@@ -5723,7 +5748,10 @@ static struct setup_menu_test setup_menu_data_681 = { .len = 12, .list = { 0x00, 0x06, 0x40, 0xB4, 0x00, 0x06, 0x40, 0xB4, 0x00, 0x06, 0x40, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span " +"style=\"text-decoration: underline;color: #347235;" + "background-color: #FFFF00;\">Toolkit Menu 1</span></div>", }; static struct setup_menu_test setup_menu_data_691 = {
@@ -5744,7 +5772,10 @@ static struct setup_menu_test setup_menu_data_691 = { .len = 12, .list = { 0x00, 0x06, 0x80, 0xB4, 0x00, 0x06, 0x80, 0xB4, 0x00, 0x06, 0x80, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span " +"style=\"text-decoration: line-through;color: #347235;" + "background-color: #FFFF00;\">Toolkit Menu 1</span></div>", }; static struct setup_menu_test setup_menu_data_6101 = {
@@ -5765,7 +5796,10 @@ static struct setup_menu_test setup_menu_data_6101 = { .len = 12, .list = { 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Toolkit Menu</span>" + "</div>", }; static struct setup_menu_test setup_menu_data_711 = {
@@ -5911,7 +5945,8 @@ static void test_setup_menu(gconstpointer data)check_text_attr (&command->setup_menu.text_attr, &test->text_attr);check_item_text_attribute_list (&command->setup_menu.item_text_attr_list, &test->item_text_attr_list); - +check_text_attr_html (&command->setup_menu.text_attr, + command->setup_menu.alpha_id, test->html);stk_command_free (command); }
Signature · 1 line
1.6.6.1
PATCH 8/9 test-stkutil: add html attribute test for select_item_test
In reply to Kristen Carlson Accardi--- unit/test-stkutil.c | 83 +++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 67 insertions(+), 16 deletions(-)
unit/test-stkutil.c +67 -16
@@ -5989,6 +5989,7 @@ struct select_item_test {struct stk_text_attribute text_attr;struct stk_item_text_attribute_list item_text_attr_list;struct stk_frame_id frame_id; +char *html; };static unsigned char select_item_111[] = {0xD0 ,0x3D ,0x81 ,0x03 ,0x01 ,0x24 ,
@@ -7035,7 +7036,10 @@ static struct select_item_test select_item_data_911 = { .item_text_attr_list = { .len = 8, .list = { 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Toolkit Select 1</span>" + "</div>", };static struct select_item_test select_item_data_912 = {
@@ -7065,7 +7069,10 @@ static struct select_item_test select_item_data_921 = { .item_text_attr_list = { .len = 8, .list = { 0x00, 0x06, 0x01, 0xB4, 0x00, 0x06, 0x01, 0xB4 } - } + }, + .html = "<div style=\"text-align: center;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Toolkit Select 1</span>" + "</div>", };static struct select_item_test select_item_data_922 = {
@@ -7095,7 +7102,10 @@ static struct select_item_test select_item_data_931 = { .item_text_attr_list = { .len = 8, .list = { 0x00, 0x06, 0x02, 0xB4, 0x00, 0x06, 0x02, 0xB4 } - } + }, + .html = "<div style=\"text-align: right;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Toolkit Select 1</span>" +"</div>" };static struct select_item_test select_item_data_932 = {
@@ -7125,7 +7135,10 @@ static struct select_item_test select_item_data_941 = { .item_text_attr_list = { .len = 8, .list = { 0x00, 0x06, 0x04, 0xB4, 0x00, 0x06, 0x04, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-size: " +"big;color: #347235;background-color: #FFFF00;\">" + "Toolkit Select 1</span></div>", };static struct select_item_test select_item_data_942 = {
@@ -7144,7 +7157,10 @@ static struct select_item_test select_item_data_942 = { .item_text_attr_list = { .len = 8, .list = { 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Toolkit Select 2</span>" + "</div>", };static struct select_item_test select_item_data_943 = {
@@ -7174,7 +7190,10 @@ static struct select_item_test select_item_data_951 = { .item_text_attr_list = { .len = 8, .list = { 0x00, 0x06, 0x08, 0xB4, 0x00, 0x06, 0x08, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-size: " +"small;color: #347235;background-color: #FFFF00;\">" + "Toolkit Select 1</span></div>", };static struct select_item_test select_item_data_952 = {
@@ -7193,7 +7212,10 @@ static struct select_item_test select_item_data_952 = { .item_text_attr_list = { .len = 8, .list = { 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Toolkit Select 2</span>" + "</div>", };static struct select_item_test select_item_data_953 = {
@@ -7223,7 +7245,10 @@ static struct select_item_test select_item_data_961 = { .item_text_attr_list = { .len = 8, .list = { 0x00, 0x06, 0x10, 0xB4, 0x00, 0x06, 0x10, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-weight: " +"bold;color: #347235;background-color: #FFFF00;\">" + "Toolkit Select 1</span></div>", };static struct select_item_test select_item_data_962 = {
@@ -7242,7 +7267,10 @@ static struct select_item_test select_item_data_962 = { .item_text_attr_list = { .len = 8, .list = { 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Toolkit Select 2</span>" + "</div>", };static struct select_item_test select_item_data_963 = {
@@ -7272,7 +7300,10 @@ static struct select_item_test select_item_data_971 = { .item_text_attr_list = { .len = 8, .list = { 0x00, 0x06, 0x20, 0xB4, 0x00, 0x06, 0x20, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-style: " +"italic;color: #347235;background-color: #FFFF00;\">" +"Toolkit Select 1</span></div>" };static struct select_item_test select_item_data_972 = {
@@ -7291,7 +7322,10 @@ static struct select_item_test select_item_data_972 = { .item_text_attr_list = { .len = 8, .list = { 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Toolkit Select 2</span>" + "</div>", };static struct select_item_test select_item_data_973 = {
@@ -7321,7 +7355,10 @@ static struct select_item_test select_item_data_981 = { .item_text_attr_list = { .len = 8, .list = { 0x00, 0x06, 0x40, 0xB4, 0x00, 0x06, 0x40, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span " +"style=\"text-decoration: underline;color: #347235;" + "background-color: #FFFF00;\">Toolkit Select 1</span></div>", };static struct select_item_test select_item_data_982 = {
@@ -7340,7 +7377,10 @@ static struct select_item_test select_item_data_982 = { .item_text_attr_list = { .len = 8, .list = { 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Toolkit Select 2</span>" + "</div>", };static struct select_item_test select_item_data_983 = {
@@ -7370,7 +7410,10 @@ static struct select_item_test select_item_data_991 = { .item_text_attr_list = { .len = 8, .list = { 0x00, 0x06, 0x80, 0xB4, 0x00, 0x06, 0x80, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span " +"style=\"text-decoration: line-through;color: #347235;" + "background-color: #FFFF00;\">Toolkit Select 1</span></div>", };static struct select_item_test select_item_data_992 = {
@@ -7389,7 +7432,10 @@ static struct select_item_test select_item_data_992 = { .item_text_attr_list = { .len = 8, .list = { 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Toolkit Select 2</span>" + "</div>", };static struct select_item_test select_item_data_993 = {
@@ -7419,7 +7465,10 @@ static struct select_item_test select_item_data_9101 = { .item_text_attr_list = { .len = 8, .list = { 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Toolkit Select 1</span>" + "</div>", };static struct select_item_test select_item_data_9102 = {
@@ -7547,6 +7596,8 @@ static void test_select_item(gconstpointer data)check_item_text_attribute_list ( &command->select_item.item_text_attr_list, &test->item_text_attr_list); +check_text_attr_html (&command->select_item.text_attr, + command->select_item.alpha_id, test->html);check_frame_id (&command->select_item.frame_id, &test->frame_id);stk_command_free (command);
Signature · 1 line
1.6.6.1
PATCH 9/9 test-stkutil: add html attribute tests for setup idle mode tests
In reply to Kristen Carlson Accardi--- unit/test-stkutil.c | 84 +++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 68 insertions(+), 16 deletions(-)
unit/test-stkutil.c +68 -16
@@ -13994,6 +13994,7 @@ struct setup_idle_mode_text_test {struct stk_icon_id icon_id;struct stk_text_attribute text_attr;struct stk_frame_id frame_id; +char *html; };static unsigned char setup_idle_mode_text_111[] = {0xD0 ,0x1A ,0x81 ,0x03 ,
@@ -14426,7 +14427,10 @@ static struct setup_idle_mode_text_test setup_idle_mode_text_data_411 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Idle Mode Text 1</span>" + "</div>", };static struct setup_idle_mode_text_test setup_idle_mode_text_data_412 = {
@@ -14444,7 +14448,10 @@ static struct setup_idle_mode_text_test setup_idle_mode_text_data_421 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x01, 0xB4 } - } + }, + .html = "<div style=\"text-align: center;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Idle Mode Text 1</span>" + "</div>", };static struct setup_idle_mode_text_test setup_idle_mode_text_data_422 = {
@@ -14462,7 +14469,10 @@ static struct setup_idle_mode_text_test setup_idle_mode_text_data_431 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x02, 0xB4 } - } + }, + .html = "<div style=\"text-align: right;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Idle Mode Text 1</span>" + "</div>", };static struct setup_idle_mode_text_test setup_idle_mode_text_data_432 = {
@@ -14480,7 +14490,10 @@ static struct setup_idle_mode_text_test setup_idle_mode_text_data_441 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x04, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-size: " +"big;color: #347235;background-color: #FFFF00;\">" + "Idle Mode Text 1</span></div>", };static struct setup_idle_mode_text_test setup_idle_mode_text_data_442 = {
@@ -14491,7 +14504,10 @@ static struct setup_idle_mode_text_test setup_idle_mode_text_data_442 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Idle Mode Text 2</span>" + "</div>", };static struct setup_idle_mode_text_test setup_idle_mode_text_data_443 = {
@@ -14509,7 +14525,10 @@ static struct setup_idle_mode_text_test setup_idle_mode_text_data_451 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x08, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-size: " +"small;color: #347235;background-color: #FFFF00;\">" + "Idle Mode Text 1</span></div>", };static struct setup_idle_mode_text_test setup_idle_mode_text_data_452 = {
@@ -14520,7 +14539,10 @@ static struct setup_idle_mode_text_test setup_idle_mode_text_data_452 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Idle Mode Text 2</span>" + "</div>", };static struct setup_idle_mode_text_test setup_idle_mode_text_data_453 = {
@@ -14538,7 +14560,10 @@ static struct setup_idle_mode_text_test setup_idle_mode_text_data_461 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x10, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-weight: " +"bold;color: #347235;background-color: #FFFF00;\">" + "Idle Mode Text 1</span></div>", };static struct setup_idle_mode_text_test setup_idle_mode_text_data_462 = {
@@ -14549,7 +14574,10 @@ static struct setup_idle_mode_text_test setup_idle_mode_text_data_462 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Idle Mode Text 2</span>" + "</div>", };static struct setup_idle_mode_text_test setup_idle_mode_text_data_463 = {
@@ -14567,7 +14595,10 @@ static struct setup_idle_mode_text_test setup_idle_mode_text_data_471 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x20, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"font-style: " +"italic;color: #347235;background-color: #FFFF00;\">" + "Idle Mode Text 1</span></div>", };static struct setup_idle_mode_text_test setup_idle_mode_text_data_472 = {
@@ -14578,7 +14609,10 @@ static struct setup_idle_mode_text_test setup_idle_mode_text_data_472 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Idle Mode Text 2</span>" + "</div>", };static struct setup_idle_mode_text_test setup_idle_mode_text_data_473 = {
@@ -14596,7 +14630,10 @@ static struct setup_idle_mode_text_test setup_idle_mode_text_data_481 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x40, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span " +"style=\"text-decoration: underline;color: #347235;" + "background-color: #FFFF00;\">Idle Mode Text 1</span></div>", };static struct setup_idle_mode_text_test setup_idle_mode_text_data_482 = {
@@ -14607,7 +14644,10 @@ static struct setup_idle_mode_text_test setup_idle_mode_text_data_482 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Idle Mode Text 2</span>" + "</div>", };static struct setup_idle_mode_text_test setup_idle_mode_text_data_483 = {
@@ -14625,7 +14665,11 @@ static struct setup_idle_mode_text_test setup_idle_mode_text_data_491 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x80, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span " +"style=\"text-decoration: line-through;color: " +"#347235;background-color: #FFFF00;\">Idle Mode Text 1</span>" + "</div>", };static struct setup_idle_mode_text_test setup_idle_mode_text_data_492 = {
@@ -14636,7 +14680,10 @@ static struct setup_idle_mode_text_test setup_idle_mode_text_data_492 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Idle Mode Text 2</span>" + "</div>", };static struct setup_idle_mode_text_test setup_idle_mode_text_data_493 = {
@@ -14654,7 +14701,10 @@ static struct setup_idle_mode_text_test setup_idle_mode_text_data_4101 = { .text_attr = { .len = 4, .attributes = { 0x00, 0x10, 0x00, 0xB4 } - } + }, + .html = "<div style=\"text-align: left;\"><span style=\"color: " +"#347235;background-color: #FFFF00;\">Idle Mode Text 1</span>" + "</div>", };static struct setup_idle_mode_text_test setup_idle_mode_text_data_4102 = {
@@ -14699,6 +14749,8 @@ static void test_setup_idle_mode_text(gconstpointer data)check_icon_id (&command->setup_idle_mode_text.icon_id, &test->icon_id);check_text_attr (&command->setup_idle_mode_text.text_attr, &test->text_attr); +check_text_attr_html (&command->setup_idle_mode_text.text_attr, + command->setup_idle_mode_text.text, test->html);check_frame_id (&command->setup_idle_mode_text.frame_id, &test->frame_id);
Signature · 1 line
1.6.6.1