pidgin: 65e01fbe: util tests: Add a test for all the lower...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Fri Apr 30 22:42:33 EDT 2010


-----------------------------------------------------------------
Revision: 65e01fbe56cc5a1d342f7992538c09a59cb364a2
Ancestor: 3f4e56b46bba0b70c7230266e045f1744a84acae
Author: darkrain42 at pidgin.im
Date: 2010-05-01T02:36:27
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/65e01fbe56cc5a1d342f7992538c09a59cb364a2

Modified files:
        libpurple/tests/test_util.c

ChangeLog: 

util tests: Add a test for all the lower-ASCII control characters excluding the
whitelisted 0x9, 0xA, and 0xD

-------------- next part --------------
============================================================
--- libpurple/tests/test_util.c	a5ecc8ec17d796a22a88277468eb36a51fea231d
+++ libpurple/tests/test_util.c	88da4e64dd0cc9050d58f8ec014f97b050692bb7
@@ -131,6 +131,10 @@ START_TEST(test_utf8_strip_unprintables)
 #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) */


More information about the Commits mailing list