Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

testutils: relax regex to include just Test, Example and Benchmark as valid test functions #2071

Closed

Description

ad95b52 introduced a stricter regex for Test, Benchmark and Example to avoid matching just Test, Example or Benchmark.

These are in fact perfectly fine as function names:

package x

import "testing"

func Test(t *testing.T) {}
» go test -v
=== RUN   Test
--- PASS: Test (0.00s)
PASS
ok      x   0.007s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions