Skip to content

testing: go test -run should warn user if there are no tests to run #7893

@gopherbot

Description

@gopherbot

by guohouzuo:

`go test` generates a very useful warning when there are no tests to run:

    > go test
    testing: warning: no tests to run
    PASS
    ok  mypkg  0.010s

However, the behaviour is different when `-run` flag is involved:

    > go test -run=DoesNotExist
    PASS
    ok   mypkg   0.011s

It will be really useful to suggest user of his/her mistake in the second case (with
-run flag).

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions