Skip to content
This repository was archived by the owner on Jul 12, 2020. It is now read-only.

Commit 24b7c17

Browse files
committed
correct the merge in FeatureContext
1 parent 205fe91 commit 24b7c17

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

features/bootstrap/FeatureContext.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,12 @@ protected function formatExpectedPatch($patch)
121121
{
122122
if ('\\' === DIRECTORY_SEPARATOR) {
123123
$formatLine = function ($line) {
124-
if (0 === strpos($line, '---') || 0 === strpos($line, '+++')) {
125-
$line = preg_replace('~/(?<!(a|b)/)~', '\\', $line);
126-
}
127-
124+
// replace lines for diff-path-files starting with --- or +++
128125
$line = preg_replace_callback('~^((?:---|\+\+\+)\s*(?:a|b)/)(.*)~', function ($match) {
129126
list($all, $diff, $path) = $match;
130127

131-
if (0 === preg_match('~^[a-z]+://~i', $path)) {
128+
// dont replace wrapped path separators
129+
if (! preg_match('~^[a-z]+://~i', $path)) {
132130
$path = str_replace('/', '\\', $path);
133131
}
134132

0 commit comments

Comments
 (0)