if (preg_match('@(loader|run\\-all)\\.php$@', $v)) { unset($out['files'][$k]); } } // $files = array_splice($out['files'], 2); $files = $out['files']; test_assertions::$successed = 0; test_assertions::$failed = 0; test_assertions::$start_time = microtime(1); $concurrent = 10; $processes = []; $file = null; $kfile = 0; $done_files = []; /** @var $process Process */ test_head('TESTS: ' . count($files)); reset($files); while (1) { while (count($processes) < $concurrent) { if ($file = next($files)) { $kfile++; // printf("* %4d (%d) %s \n", $kfile, count($processes), $file); // run test $process = new Process("php -f {$file} 2>&1", dirname($file)); $processes[] = [$process, microtime(1), $kfile, $file]; $process->start(); } else { break; } } // main queue loop
if (file_exists("filters/filters.php")) { include "filters/filters.php"; } echo apply_filters("the_content", gather_content()); } include "../wp-syntax.php"; ?> <html> <head> <title>WP-Syntax Test Page</title> <link rel="stylesheet" href="../wp-syntax.css" type="text/css" media="screen" /> <?php test_head(); define("TEMPLATEPATH", "../"); test_head(); ?> <style type="text/css" media="screen"> .wp_syntax td div, .wp_syntax div div { padding: 0; } </style> </head> <body> <div style="width:50%;"> <h1>Vanilla, without other filters</h1> <?php test_all(); ?>
/** * Complete */ function test_done() { list($oks, $fails) = test_assertions::get(); test_head(sprintf('%-10s (+%d, -%d) %s', test_assertions::$failed ? 'FAILED' : 'PASSED', $oks, $fails, basename($_SERVER['PHP_SELF']))); printf('Time: %.5f ms, Mem: %.3f MB %s', microtime(1) - test_assertions::$start_time, memory_get_peak_usage() / 1048576, Strings::nl()); // outro exit($fails ? 1 : 0); }