mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-09 15:28:40 +00:00
Fix newline issues in tests.
Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
parent
e128c09132
commit
6691676666
2
NEWS
2
NEWS
@ -17,6 +17,8 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
|
|||||||
. Add verbose mode to command line test runner, use (--verbose)
|
. Add verbose mode to command line test runner, use (--verbose)
|
||||||
. Turn on unit tests for UnitConverter
|
. Turn on unit tests for UnitConverter
|
||||||
. Fix missing version number in configuration %Attr.DefaultImageAlt (added 3.2.0)
|
. Fix missing version number in configuration %Attr.DefaultImageAlt (added 3.2.0)
|
||||||
|
. Fix newline errors that caused spurious failures when CRLF HTML Purifier was
|
||||||
|
tested on Linux.
|
||||||
|
|
||||||
3.2.0, released 2008-10-31
|
3.2.0, released 2008-10-31
|
||||||
# Using %Core.CollectErrors forces line number/column tracking on, whereas
|
# Using %Core.CollectErrors forces line number/column tracking on, whereas
|
||||||
|
@ -18,6 +18,8 @@ class HTMLPurifier_Harness extends UnitTestCase
|
|||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
list($this->config, $this->context) = $this->createCommon();
|
list($this->config, $this->context) = $this->createCommon();
|
||||||
|
$this->config->set('Output', 'Newline', '
|
||||||
|
');
|
||||||
$this->purifier = new HTMLPurifier();
|
$this->purifier = new HTMLPurifier();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,8 @@ if (!function_exists('spl_autoload_register')) {
|
|||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
function __autoload($class) {
|
function __autoload($class) {
|
||||||
echo "Autoloading $class..." . PHP_EOL;
|
echo "Autoloading $class...
|
||||||
|
";
|
||||||
eval("class $class {}");
|
eval("class $class {}");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -16,7 +17,8 @@ require '../library/HTMLPurifier.auto.php';
|
|||||||
require 'HTMLPurifier/PHPT/loading/_autoload.inc';
|
require 'HTMLPurifier/PHPT/loading/_autoload.inc';
|
||||||
$config = HTMLPurifier_Config::createDefault();
|
$config = HTMLPurifier_Config::createDefault();
|
||||||
$purifier = new HTMLPurifier($config);
|
$purifier = new HTMLPurifier($config);
|
||||||
echo $purifier->purify('<b>Salsa!') . PHP_EOL;
|
echo $purifier->purify('<b>Salsa!') . "
|
||||||
|
";
|
||||||
|
|
||||||
// purposely invoke older autoload
|
// purposely invoke older autoload
|
||||||
$bar = new Bar();
|
$bar = new Bar();
|
||||||
|
@ -8,14 +8,16 @@ if (!function_exists('spl_autoload_register')) {
|
|||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
function my_autoload($class) {
|
function my_autoload($class) {
|
||||||
echo "Autoloading $class..." . PHP_EOL;
|
echo "Autoloading $class...
|
||||||
|
";
|
||||||
eval("class $class {}");
|
eval("class $class {}");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
class MyClass {
|
class MyClass {
|
||||||
public static function myAutoload($class) {
|
public static function myAutoload($class) {
|
||||||
if ($class == 'Foo') {
|
if ($class == 'Foo') {
|
||||||
echo "Special autoloading Foo..." . PHP_EOL;
|
echo "Special autoloading Foo...
|
||||||
|
";
|
||||||
eval("class $class {}");
|
eval("class $class {}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -28,7 +30,8 @@ require '../library/HTMLPurifier.auto.php';
|
|||||||
require 'HTMLPurifier/PHPT/loading/_autoload.inc';
|
require 'HTMLPurifier/PHPT/loading/_autoload.inc';
|
||||||
$config = HTMLPurifier_Config::createDefault();
|
$config = HTMLPurifier_Config::createDefault();
|
||||||
$purifier = new HTMLPurifier($config);
|
$purifier = new HTMLPurifier($config);
|
||||||
echo $purifier->purify('<b>Salsa!') . PHP_EOL;
|
echo $purifier->purify('<b>Salsa!') . "
|
||||||
|
";
|
||||||
|
|
||||||
// purposely invoke older autoloads
|
// purposely invoke older autoloads
|
||||||
$foo = new Foo();
|
$foo = new Foo();
|
||||||
|
@ -12,7 +12,8 @@ require '../library/HTMLPurifier.auto.php';
|
|||||||
require 'HTMLPurifier/PHPT/loading/_autoload.inc';
|
require 'HTMLPurifier/PHPT/loading/_autoload.inc';
|
||||||
$config = HTMLPurifier_Config::createDefault();
|
$config = HTMLPurifier_Config::createDefault();
|
||||||
$purifier = new HTMLPurifier($config);
|
$purifier = new HTMLPurifier($config);
|
||||||
echo $purifier->purify('<b>Salsa!') . PHP_EOL;
|
echo $purifier->purify('<b>Salsa!') . "
|
||||||
|
";
|
||||||
|
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
<b>Salsa!</b>
|
<b>Salsa!</b>
|
||||||
|
@ -9,7 +9,8 @@ if (function_exists('spl_autoload_register')) {
|
|||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
function __autoload($class) {
|
function __autoload($class) {
|
||||||
echo "Autoloading $class..." . PHP_EOL;
|
echo "Autoloading $class...
|
||||||
|
";
|
||||||
eval("class $class {}");
|
eval("class $class {}");
|
||||||
}
|
}
|
||||||
require '../library/HTMLPurifier.auto.php';
|
require '../library/HTMLPurifier.auto.php';
|
||||||
|
Loading…
Reference in New Issue
Block a user