Skip to content

testing: align -v output #10594

@mdwhatcott

Description

@mdwhatcott

The go test output might be easier to read if it test function names were aligned, much like gofmt treats struct definitions. Here's what it normally looks like:

=== RUN TestGroupContextListings
--- PASS: TestGroupContextListings (0.00s)
=== RUN TestIdentifyCompletedTasks
--- FAIL: TestIdentifyCompletedTasks (0.00s)
=== RUN TestIdentifyStalledProjects
--- PASS: TestIdentifyStalledProjects (0.00s)
=== RUN TestIdentifyFinishedProjects
--- PASS: TestIdentifyFinishedProjects (0.00s)
FAIL
exit status 1
FAIL    github.com/blahblah/blah    0.004s

Here's how a tiny bit of formatting could improve things:

=== RUN   TestGroupContextListings
--- PASS: TestGroupContextListings (0.00s)
=== RUN   TestIdentifyCompletedTasks
--- FAIL: TestIdentifyCompletedTasks (0.00s)
=== RUN   TestIdentifyStalledProjects
--- PASS: TestIdentifyStalledProjects (0.00s)
=== RUN   TestIdentifyFinishedProjects
--- PASS: TestIdentifyFinishedProjects (0.00s)
FAIL
exit status 1
FAIL    github.com/blahblah/blah    0.004s

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions