From 35dfa544546e1dcc4ffda7d76521c5d73920dacf Mon Sep 17 00:00:00 2001 From: Ewout Pieter den Ouden Date: Wed, 9 Jan 2019 14:34:42 +0100 Subject: [PATCH] Try to get Windows CI to agree on line offsets --- src/Runner/PhptTestCase.php | 2 +- tests/end-to-end/_files/phpt-skipif-location-hint-example.phpt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Runner/PhptTestCase.php b/src/Runner/PhptTestCase.php index 510aba0603a..2b254da2c79 100644 --- a/src/Runner/PhptTestCase.php +++ b/src/Runner/PhptTestCase.php @@ -655,7 +655,7 @@ private function getLocationHint(string $needle, array $sections, ?string $secti $sectionOffset = $sections[$section . '_offset'] ?? 0; $offset = $sectionOffset + 1; - $lines = \explode(\PHP_EOL, $sections[$section]); + $lines = \preg_split('/\r\n|\r|\n/', $sections[$section]); foreach ($lines as $line) { if (\strpos($line, $needle) !== false) { diff --git a/tests/end-to-end/_files/phpt-skipif-location-hint-example.phpt b/tests/end-to-end/_files/phpt-skipif-location-hint-example.phpt index b28316fc5ba..1437dcc6609 100644 --- a/tests/end-to-end/_files/phpt-skipif-location-hint-example.phpt +++ b/tests/end-to-end/_files/phpt-skipif-location-hint-example.phpt @@ -6,7 +6,6 @@ print "Nothing to see here, move along"; ?> --SKIPIF-- --EXPECT--