MediaWiki  REL1_19
Utf8Test.php File Reference

Runs the UTF-8 decoder test at: http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt. More...

Go to the source code of this file.

Functions

 testLine ($test, $line, &$total, &$success, &$failed, $columns, $exceptions, $verbose)

Variables

if(!$in) $columns = 0
 $exceptions
 $failed = 0
while(false!==($line=fgets($in)))
if(!$columns) 
$ignore
if(php_sapi_name()!= 'cli') $in = fopen( "UTF-8-test.txt", "rt" )
 $longTests
 $section = null
 $sectionTests = array( '3.4' )
 $success = 0
 $test = ''
 $total = 0
 $verbose = false
while(false!==($line=fgets($in))) if ($failed)

Detailed Description

Runs the UTF-8 decoder test at: http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt.

Copyright © 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 Utf8Test.php.


Function Documentation

testLine ( test,
line,
&$  total,
&$  success,
&$  failed,
columns,
exceptions,
verbose 
)

Definition at line 126 of file Utf8Test.php.

References $columns, $exceptions, $failed, $ok, $success, $test, $total, $verbose, and print.


Variable Documentation

if (!$in) $columns = 0
$exceptions
Initial value:
 array(
        # Tests that should mark invalid characters due to using long
        # sequences beyond what is now considered legal.
        '2.1.5', '2.1.6', '2.2.4', '2.2.5', '2.2.6', '2.3.5',

        # Literal 0xffff, which is illegal
        '2.2.3' )

Definition at line 71 of file Utf8Test.php.

Referenced by ResourceLoader\makeModuleResponse(), testLine(), and wfIsBadImage().

$failed = 0

Definition at line 89 of file Utf8Test.php.

Referenced by TestRecorder\reportPercentage(), and testLine().

while (false!==($line=fgets($in))) if (!$columns) $ignore
Initial value:
 array(
        # These two lines actually seem to be corrupt
        '2.1.1', '2.2.1' )

Definition at line 67 of file Utf8Test.php.

Referenced by DatabasePostgres\insert(), DatabaseIbm_db2\insert(), DatabasePostgres\insertSelect(), DatabaseOracle\reportQueryError(), and DatabaseBase\reportQueryError().

if (php_sapi_name()!= 'cli') $in = fopen( "UTF-8-test.txt", "rt" )

Definition at line 41 of file Utf8Test.php.

$longTests
Initial value:
 array(
        # These tests span multiple lines
        '3.1.9', '3.2.1', '3.2.2', '3.2.3', '3.2.4', '3.2.5',
        '3.4' )

Definition at line 79 of file Utf8Test.php.

$sectionTests = array( '3.4' )

Definition at line 85 of file Utf8Test.php.

$verbose = false

Definition at line 35 of file Utf8Test.php.

Referenced by RefreshImageMetadata\execute(), and testLine().

while (false!==($line=fgets($in))) if($failed)

Definition at line 116 of file Utf8Test.php.