Mercurial > pidgin.yaz
changeset 30269:702ea988070c
util tests: Add a test for all the lower-ASCII control characters excluding the
whitelisted 0x9, 0xA, and 0xD
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sat, 01 May 2010 02:36:27 +0000 |
parents | e89bf860e3cf |
children | 552616f49f94 |
files | libpurple/tests/test_util.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/tests/test_util.c Sat May 01 01:03:38 2010 +0000 +++ b/libpurple/tests/test_util.c Sat May 01 02:36:27 2010 +0000 @@ -131,6 +131,10 @@ #endif /* \t, \n, \r, space */ assert_string_equal_free("ab \tcd\nef\r ", purple_utf8_strip_unprintables("ab \tcd\nef\r ")); + /* ASCII control characters (stripped) */ + assert_string_equal_free(" aaaa ", purple_utf8_strip_unprintables( + "\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0E\x0F\x10 aaaa " + "\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F")); /* Basic ASCII */ assert_string_equal_free("Foobar", purple_utf8_strip_unprintables("Foobar")); /* 0xE000 - 0xFFFD (UTF-8 encoded) */