Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions