MediaWiki  REL1_24
RandomTest.php File Reference

Test feeds random 16-byte strings to both the pure PHP and ICU-based UtfNormal::cleanUp() code paths, and checks to see if there's a difference. More...

Go to the source code of this file.

Functions

 donorm ($str)
 randomString ($length, $nullOk, $ascii=false)
 showDiffs ($a, $b)

Variables

 $n = 0
 $size = 16
 if (PHP_SAPI!= 'cli')

Detailed Description

Test feeds random 16-byte strings to both the pure PHP and ICU-based UtfNormal::cleanUp() code paths, and checks to see if there's a difference.

Will run forever until it finds one or you kill it.

Copyright (C) 2004 Brion Vibber <[email protected]> https://www.mediawiki.org/

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html

Definition in file RandomTest.php.


Function Documentation

donorm ( str)

Definition at line 50 of file RandomTest.php.

References UtfNormal\UNORM_NFC.

randomString ( length,
nullOk,
ascii = false 
)

Definition at line 41 of file RandomTest.php.

References $out.

showDiffs ( a,
b 
)

Definition at line 61 of file RandomTest.php.

References $matches, array(), and as.


Variable Documentation

$n = 0

Definition at line 77 of file RandomTest.php.

Referenced by FileOpBatch\attempt(), JSParser\Block(), ChangesFeed\buildItems(), LanguageWa\date(), GetLagTimes\execute(), BatchedQueryRunner\execute(), AttachLatest\execute(), FixDoubleRedirects\execute(), ApiQueryUsers\execute(), JSParser\Expression(), ApiQueryRevisions\extractRowInfo(), UtfNormal\fastCombiningSort(), UtfNormal\fastCompose(), UtfNormal\fastDecompose(), DatabaseMssql\fieldName(), findAuxFile(), PostgresField\fromText(), RevisionDeleter\getChanges(), SpecialPageFactory\getLocalNameFor(), RandomPage\getNsList(), SpecialExport\getPagesFromCategory(), SpecialExport\getPagesFromNamespace(), Skin\getUndeleteLink(), ZipDirectoryReader\hexDump(), hexSequenceToUtf8(), BagOStuff\incr(), lessc_formatter_classic\indentStr(), WfGetCallerTest\intermediateFunction(), UploadBase\isThumbName(), DateFormatter\makeIsoMonth(), JSMinPlus\min(), DatabaseMysql\mysqlFetchField(), DatabaseMysqli\mysqlFetchField(), DatabaseMysql\mysqlFieldName(), DatabaseMysqli\mysqlFieldName(), DatabaseMysql\mysqlFieldType(), DatabaseMysqli\mysqlFieldType(), JSParser\nest(), SearchMySQL\normalizeText(), JSParser\ParenExpression(), JSParser\parse(), JSMinPlus\parseTree(), FormatJson\prettyPrint(), UtfNormal\quickIsNFC(), UtfNormal\quickIsNFCVerify(), JSParser\reduce(), JSParser\Script(), Preferences\searchPreferences(), SpecialPrefixindex\showPrefixChunk(), JSParser\Statement(), JSParser\Statements(), WikiPageTest\testDoDeleteArticle(), WikiPageTest\testDoDeleteUpdates(), WikiPageTest\testDoEdit(), WikiPageTest\testDoEditContent(), JSParser\Variables(), wfMsgReplaceArgs(), and wfRandomString().

if(PHP_SAPI!= 'cli')

Definition at line 29 of file RandomTest.php.