$result = testNFD( $u, $c, $comment, $reportFailure ) && $result;
$result = testNFKC( $u, $c, $comment, $reportFailure ) && $result;
$result = testNFKD( $u, $c, $comment, $reportFailure ) && $result;
+ $result = testCleanUp( $u, $c, $comment, $reportFailure ) && $result;
global $verbose;
if( $verbose && !$result && !$reportFailure ) {
return $result;
}
+function testCleanUp( &$u, $c, $comment, $verbose ) {
+ $x = $c[1];
+ $result = verbosify( $c[2], $u->cleanUp( $x ), 1, 'cleanUp', $verbose );
+ $x = $c[2];
+ $result = verbosify( $c[2], $u->cleanUp( $x ), 2, 'cleanUp', $verbose ) && $result;
+ $x = $c[3];
+ $result = verbosify( $c[2], $u->cleanUp( $x ), 3, 'cleanUp', $verbose ) && $result;
+ $x = $c[4];
+ $result = verbosify( $c[4], $u->cleanUp( $x ), 4, 'cleanUp', $verbose ) && $result;
+ $x = $c[5];
+ $result = verbosify( $c[4], $u->cleanUp( $x ), 5, 'cleanUp', $verbose ) && $result;
+ return $result;
+}
+
function testNFD( &$u, $c, $comment, $verbose ) {
$result = verbosify( $c[3], $u->toNFD( $c[1] ), 1, 'NFD', $verbose );
$result = verbosify( $c[3], $u->toNFD( $c[2] ), 2, 'NFD', $verbose ) && $result;
$result = verbosify( $char, $u->toNFD( $char ), 1, 'NFD', $reportFailure ) && $result;
$result = verbosify( $char, $u->toNFKC( $char ), 1, 'NFKC', $reportFailure ) && $result;
$result = verbosify( $char, $u->toNFKD( $char ), 1, 'NFKD', $reportFailure ) && $result;
+ $c = $char;
+ $result = verbosify( $char, $u->cleanUp( $char ), 1, 'cleanUp', $reportFailure ) && $result;
global $verbose;
if( $verbose && !$result && !$reportFailure ) {
print $desc;