Skip to content

Commit

Permalink
Adjust link test to account for colors
Browse files Browse the repository at this point in the history
  • Loading branch information
weirdan committed Nov 27, 2021
1 parent 03ae329 commit ec1571d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Psalm/Report/ConsoleReport.php
Expand Up @@ -124,9 +124,9 @@ private function getFileReference($data): string
$file_path = substr($data->file_name, 0, -strlen($file_basename));

$reference = $file_path
. "\e[1;31m"
. "\033[1;31m"
. $file_basename . ':' . $data->line_from . ':' . $data->column_from
. "\e[0m"
. "\033[0m"
;

if (null === $this->link_format) {
Expand Down
2 changes: 1 addition & 1 deletion tests/ReportOutputTest.php
Expand Up @@ -1079,7 +1079,7 @@ public function testConsoleReportWithLinks(): void
$output = IssueBuffer::getOutput(IssueBuffer::getIssuesData(), $console_report_options);

$this->assertStringContainsString(
"\033]8;;file://somefile.php#L3\033\\somefile.php:3:10\033]8;;\033\\",
"\033]8;;file://somefile.php#L3\033\\\033[1;31msomefile.php:3:10\033[0m\033]8;;\033\\",
$output
);
}
Expand Down

0 comments on commit ec1571d

Please sign in to comment.