From: Max Semenik Date: Sun, 7 Aug 2011 08:08:36 +0000 (+0000) Subject: Fixed sidebar tests on Windows. Can't use PHP_EOL here because \r\n is used only... X-Git-Tag: 1.31.0-rc.0~28397 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=437c059be4ad63436f58d4bfbad317bb4db559e9;p=lhc%2Fweb%2Fwiklou.git Fixed sidebar tests on Windows. Can't use PHP_EOL here because \r\n is used only in SVN checkouts and not in tarballs --- diff --git a/includes/Skin.php b/includes/Skin.php index dfdb2104f2..28a84f73fb 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1125,6 +1125,7 @@ abstract class Skin extends ContextSource { if ( strpos( $line, '*' ) !== 0 ) { continue; } + $line = rtrim( $line, "\r" ); // for Windows compat if ( strpos( $line, '**' ) !== 0 ) { $heading = trim( $line, '* ' ); diff --git a/tests/phpunit/skins/SideBarTest.php b/tests/phpunit/skins/SideBarTest.php index 914ea3aad1..47182a711a 100644 --- a/tests/phpunit/skins/SideBarTest.php +++ b/tests/phpunit/skins/SideBarTest.php @@ -1,5 +1,8 @@