? .DS_Store ? check_plain_test.patch.patch ? head2.db ? sites/default/files ? sites/default/settings.php Index: modules/simpletest/tests/bootstrap.test =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/tests/bootstrap.test,v retrieving revision 1.12 diff -u -F^f -p -r1.12 bootstrap.test --- modules/simpletest/tests/bootstrap.test 31 Jan 2009 16:50:57 -0000 1.12 +++ modules/simpletest/tests/bootstrap.test 6 Mar 2009 22:07:01 -0000 @@ -230,3 +230,30 @@ class HookBootExitTestCase extends Drupa } } +/** + * Test check_plain(). + */ +class CheckPlainTestCase extends DrupalWebTestCase { + function getInfo() { + return array( + 'name' => t(''), + 'description' => t(''), + 'group' => t('Bootstrap'), + ); + } + + /** + * Test check_plain(). + */ + function testCheckPlain() { + // Test non-utf8 characters. + $this->assertIdentical(check_plain(0x20000), '', t('Non-UTF8 characters don\'t show up')); + // Test normal text. + $plain = $this->randomName(5); + $this->assertIdentical(check_plain($plain), $plain, t('Plain data remains plain')); + // Test a few HTML entities. + $this->assertIdentical(check_plain('