MediaWiki  REL1_22
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]> http://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 49 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 60 of file RandomTest.php.

References $matches, array(), and as.


Variable Documentation

$n = 0

Definition at line 76 of file RandomTest.php.

Referenced by _DiffEngine\_diag(), FileOpBatch\attempt(), JSParser\Block(), SkinTemplate\buildContentNavigationUrls(), LanguageWa\date(), GetLagTimes\execute(), BatchedQueryRunner\execute(), AttachLatest\execute(), FixDoubleRedirects\execute(), ApiQueryUsers\execute(), JSParser\Expression(), ApiQueryRevisions\extractRowInfo(), UtfNormal\fastCombiningSort(), UtfNormal\fastCompose(), UtfNormal\fastDecompose(), DatabaseMssql\fieldName(), DatabaseOracle\fieldName(), DatabasePostgres\fieldName(), ForeignAPIRepo\fileExistsBatch(), findAuxFile(), FixSlaveDesync\findPageLatestCorruption(), PostgresField\fromText(), ChangesFeed\generateFeed(), RevisionDeleter\getChanges(), FormatMetadata\getFormattedData(), SpecialPageFactory\getLocalNameFor(), RandomPage\getNsList(), SpecialExport\getPagesFromCategory(), SpecialExport\getPagesFromNamespace(), Skin\getUndeleteLink(), ZipDirectoryReader\hexDump(), hexSequenceToUtf8(), BagOStuff\incr(), lessc_formatter_classic\indentStr(), WfGetCallerTest\intermediateFunction(), Title\isDeleted(), UploadBase\isThumbName(), DateFormatter\makeIsoMonth(), JSMinPlus\min(), DatabaseMysql\mysqlFetchField(), DatabaseMysqli\mysqlFetchField(), DatabaseMysql\mysqlFieldName(), DatabaseMysqli\mysqlFieldName(), Title\nameOf(), JSParser\nest(), SearchMySQL\normalizeText(), DatabasePostgres\numRows(), JSParser\ParenExpression(), JSParser\parse(), JSMinPlus\parseTree(), FormatJson\prettyPrint(), UtfNormal\quickIsNFC(), UtfNormal\quickIsNFCVerify(), EnhancedChangesList\recentChangesBlockGroup(), JSParser\reduce(), JSParser\Script(), SpecialPrefixindex\showPrefixChunk(), JSParser\Statement(), JSParser\Statements(), WikiPageTest\testDoDeleteArticle(), WikiPageTest\testDoDeleteUpdates(), WikiPageTest\testDoEdit(), WikiPageTest\testDoEditContent(), JSParser\Variables(), wfCountDown(), wfMsgReplaceArgs(), and wfRandomString().

if(PHP_SAPI!= 'cli')

Definition at line 29 of file RandomTest.php.