From 437c059be4ad63436f58d4bfbad317bb4db559e9 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Sun, 7 Aug 2011 08:08:36 +0000 Subject: [PATCH] Fixed sidebar tests on Windows. Can't use PHP_EOL here because \r\n is used only in SVN checkouts and not in tarballs --- includes/Skin.php | 1 + tests/phpunit/skins/SideBarTest.php | 3 +++ 2 files changed, 4 insertions(+) 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 @@