Skip to content

Commit f6c1a4d

Browse files
committed
test: add logic to normalize line break code
For Windows.
1 parent d03c793 commit f6c1a4d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/Commands/SetupTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@ private function createFilesystem(): string
135135

136136
private function getOutputWithoutColorCode(): string
137137
{
138-
return str_replace(["\033[0;32m", "\033[0m"], '', $this->io->getOutputs());
138+
$output = str_replace(["\033[0;32m", "\033[0m"], '', $this->io->getOutputs());
139+
140+
if (is_windows()) {
141+
$output = str_replace("\r\n", "\n", $output);
142+
}
143+
144+
return $output;
139145
}
140146
}

0 commit comments

Comments
 (0)