Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Console Report: on fail test print path-line to work with ide hyperlink #75

Closed
fdefelici opened this issue Dec 16, 2023 · 1 comment
Closed
Assignees
Labels
documentation Improvements or additions to documentation improvement Improve an already implemented feature
Milestone

Comments

@fdefelici
Copy link
Owner

fdefelici commented Dec 16, 2023

Feature that could be helpful for the one running clove-unit tests from a Terminal within an ide (e.g. vscode).
Basically the idea is to produce a path-line format so that the ide succeed to create an hyperlink, making the failining testcase easyly reachable with a click (or CTRL+click depending on ide).

Currently in pretty print report, on test with failure the path line are printed like this:

<AbsolutePathToTestFile>@<LineNumber>

Convert this format as c/cpp compilers do, so that will allow an ide with terminal hyperlink feature to create the link with the real file. Possible choises:

  • <AbsolutePathToTestFile>(<LineNumber>)
  • <AbsolutePathToTestFile>:<LineNumber>

NOTE: Compilers format is (<LineNumber>,<ColumnNumber>) or <LineNumber>:<ColumnNumber>, but for this usecase, ColumnNumber could be omitted and hyperlink would be created anyway

This an example of the hyperlink created by vscode from its terminal:
image

@fdefelici fdefelici changed the title report pretty: on fail test print path-line to work with ide hyperlink Console Report: on fail test print path-line to work with ide hyperlink Dec 16, 2023
@fdefelici fdefelici added the improvement Improve an already implemented feature label Dec 26, 2023
@fdefelici fdefelici added this to the v2.4.2 milestone Dec 26, 2023
@fdefelici fdefelici added the documentation Improvements or additions to documentation label Dec 26, 2023
@fdefelici fdefelici self-assigned this Dec 26, 2023
fdefelici added a commit that referenced this issue Dec 26, 2023
@fdefelici
Copy link
Owner Author

Opted for file:line pattern

fdefelici added a commit that referenced this issue Dec 26, 2023
…print-path-line-to-work-with-ide-hyperlink

#75 pretty print now produce file:line pattern for failing test so th…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation improvement Improve an already implemented feature
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant