Mercurial > pidgin.yaz
changeset 28106:301c966fa7af
Add testing for font size
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 31 Jul 2009 09:18:07 +0000 |
parents | 516993d86e72 |
children | 1c9d3038a0d3 |
files | libpurple/tests/test_yahoo_util.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/tests/test_yahoo_util.c Fri Jul 31 09:04:20 2009 +0000 +++ b/libpurple/tests/test_yahoo_util.c Fri Jul 31 09:18:07 2009 +0000 @@ -16,11 +16,17 @@ START_TEST(test_codes_to_html) { assert_string_equal_free("plain", yahoo_codes_to_html("plain")); + + /* bold/italic/underline */ assert_string_equal_free("<b>bold", yahoo_codes_to_html("\x1B[1mbold")); assert_string_equal_free("<i>italic", yahoo_codes_to_html("\x1B[2mitalic")); assert_string_equal_free("<u>underline", yahoo_codes_to_html("\x1B[4munderline")); assert_string_equal_free("<b>bold</b> <i>italic</i> <u>underline", yahoo_codes_to_html("\x1B[1mbold\x1B[x1m \x1B[2mitalic\x1B[x2m \x1B[4munderline")); + + /* font color and size */ assert_string_equal_free("<span style=\"color: #0000FF\">blue", yahoo_codes_to_html("\x1B[31mblue")); + assert_string_equal_free("<font size=\"4\" absz=\"15\">test", yahoo_codes_to_html("<font size=\"15\">test")); + assert_string_equal_free("<span style=\"color: #FF0080\"><font size=\"4\" absz=\"15\">test", yahoo_codes_to_html("\x1B[35m<font size=\"15\">test")); } END_TEST