4 chdir(dirname(__FILE__));
5 require_once
'common.php';
13 chdir(dirname(__FILE__) .
'/..');
23 prefix_is(
'./library/standalone', $file) ||
39 postfix_is(
'library/HTMLPurifier.includes.php', $file) ||
40 postfix_is(
'library/HTMLPurifier.safe-includes.php', $file) ||
41 postfix_is(
'smoketests/xssAttacks.xml', $file) ||
48 $file ==
'./library/HTMLPurifier/Lexer/PH5P.php' ||
49 $file ==
'./maintenance/PH5P.php' 51 $ext = strrchr($file,
'.');
62 if (
postfix_is(
'Doxyfile', $file)) $ext =
'Doxyfile';
63 if (
postfix_is(
'.php.in', $file)) $ext =
'.php';
75 $line =
"<!-- %s\n-->";
93 prefix_is(
'./library/HTMLPurifier/ConfigSchema', $file) ||
94 prefix_is(
'./smoketests/test-schema', $file) ||
95 prefix_is(
'./tests/HTMLPurifier/StringHashParser', $file)
107 throw new Exception(
'Unknown file: ' . $file);
113 $regex =
'~' . str_replace(
'%s',
'vim: .+', preg_quote($line,
'~')) .
'~m';
118 if (strpos(
$contents,
"\r\n") !==
false) $nl =
"\r\n";
119 elseif (strpos(
$contents,
"\n") !==
false) $nl =
"\n";
120 elseif (strpos(
$contents,
"\r") !==
false) $nl =
"\r";
postfix_is($comp, $subject)
prefix_is($comp, $subject)
if($is_dev) echo "Review changes write something in WHATSNEW and and then commit with log PHP_EOL
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file