Skip to content

Commit

Permalink
Fix filter matching on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Naktibalda committed Jan 31, 2021
1 parent 2a19935 commit 4daa0bd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Codeception/Command/Run.php
Expand Up @@ -540,7 +540,13 @@ protected function matchTestFromFilename($filename, $testsPath)
{
$filter = '';
if (strpos($filename, ':') !== false) {
list($filename, $filter) = explode(':', $filename, 2);
if (PHP_OS === 'Windows' || PHP_OS === 'WINNT') {
list($drive, $path, $filter) = explode(':', $filename, 3);
$filename = $drive . ':' . $path;
} else {
list($filename, $filter) = explode(':', $filename, 2);
}

if ($filter) {
$filter = ':' . $filter;
}
Expand Down

0 comments on commit 4daa0bd

Please sign in to comment.