From 66916766661f8626aa68e6254746243134d06fbe Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Wed, 26 Nov 2008 15:30:59 -0500 Subject: [PATCH] Fix newline issues in tests. Signed-off-by: Edward Z. Yang --- NEWS | 2 ++ tests/HTMLPurifier/Harness.php | 2 ++ tests/HTMLPurifier/PHPT/loading/auto-with-autoload.phpt | 6 ++++-- .../PHPT/loading/auto-with-spl-autoload.phpt | 9 ++++++--- .../PHPT/loading/auto-without-spl-autoload.phpt | 3 ++- .../PHPT/loading/auto-without-spl-with-autoload.phpt | 3 ++- 6 files changed, 18 insertions(+), 7 deletions(-) diff --git a/NEWS b/NEWS index 8bf79408..dd1057b2 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,8 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier . Add verbose mode to command line test runner, use (--verbose) . Turn on unit tests for UnitConverter . 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 # Using %Core.CollectErrors forces line number/column tracking on, whereas diff --git a/tests/HTMLPurifier/Harness.php b/tests/HTMLPurifier/Harness.php index 97c898d2..7a71bc5d 100644 --- a/tests/HTMLPurifier/Harness.php +++ b/tests/HTMLPurifier/Harness.php @@ -18,6 +18,8 @@ class HTMLPurifier_Harness extends UnitTestCase */ public function setUp() { list($this->config, $this->context) = $this->createCommon(); + $this->config->set('Output', 'Newline', ' +'); $this->purifier = new HTMLPurifier(); } diff --git a/tests/HTMLPurifier/PHPT/loading/auto-with-autoload.phpt b/tests/HTMLPurifier/PHPT/loading/auto-with-autoload.phpt index a446f87b..9fcf606e 100644 --- a/tests/HTMLPurifier/PHPT/loading/auto-with-autoload.phpt +++ b/tests/HTMLPurifier/PHPT/loading/auto-with-autoload.phpt @@ -8,7 +8,8 @@ if (!function_exists('spl_autoload_register')) { --FILE-- purify('Salsa!') . PHP_EOL; +echo $purifier->purify('Salsa!') . " +"; // purposely invoke older autoload $bar = new Bar(); diff --git a/tests/HTMLPurifier/PHPT/loading/auto-with-spl-autoload.phpt b/tests/HTMLPurifier/PHPT/loading/auto-with-spl-autoload.phpt index a306143f..97c4e033 100644 --- a/tests/HTMLPurifier/PHPT/loading/auto-with-spl-autoload.phpt +++ b/tests/HTMLPurifier/PHPT/loading/auto-with-spl-autoload.phpt @@ -8,14 +8,16 @@ if (!function_exists('spl_autoload_register')) { --FILE-- purify('Salsa!') . PHP_EOL; +echo $purifier->purify('Salsa!') . " +"; // purposely invoke older autoloads $foo = new Foo(); diff --git a/tests/HTMLPurifier/PHPT/loading/auto-without-spl-autoload.phpt b/tests/HTMLPurifier/PHPT/loading/auto-without-spl-autoload.phpt index be56f132..e15d25f8 100644 --- a/tests/HTMLPurifier/PHPT/loading/auto-without-spl-autoload.phpt +++ b/tests/HTMLPurifier/PHPT/loading/auto-without-spl-autoload.phpt @@ -12,7 +12,8 @@ require '../library/HTMLPurifier.auto.php'; require 'HTMLPurifier/PHPT/loading/_autoload.inc'; $config = HTMLPurifier_Config::createDefault(); $purifier = new HTMLPurifier($config); -echo $purifier->purify('Salsa!') . PHP_EOL; +echo $purifier->purify('Salsa!') . " +"; --EXPECT-- Salsa! diff --git a/tests/HTMLPurifier/PHPT/loading/auto-without-spl-with-autoload.phpt b/tests/HTMLPurifier/PHPT/loading/auto-without-spl-with-autoload.phpt index 7bf6612b..8ac18630 100644 --- a/tests/HTMLPurifier/PHPT/loading/auto-without-spl-with-autoload.phpt +++ b/tests/HTMLPurifier/PHPT/loading/auto-without-spl-with-autoload.phpt @@ -9,7 +9,8 @@ if (function_exists('spl_autoload_register')) { --FILE--