aboutsummaryrefslogtreecommitdiff
path: root/src/net/http
diff options
context:
space:
mode:
authorKir Kolyshkin <kolyshkin@gmail.com>2024-09-09 11:04:13 -0700
committerGopher Robot <gobot@golang.org>2024-09-13 16:56:48 +0000
commit4c0f0985337386e0c0a3aad09251d5ee7f2b145e (patch)
tree8964cf2329c36d17fc043212c05e3443e1b8eb53 /src/net/http
parentf3c89e21a566a6c82cff3e4d4b30e21de22a84fa (diff)
downloadgo-4c0f0985337386e0c0a3aad09251d5ee7f2b145e.tar.xz
internal/testenv: add MustHaveSource, rm HasSrc
All the users of HasSrc call t.Skip anyway, so let's move it to testenv. Fix go/build to use MustHaveSource rather than MustHaveGoBuild where appropriate. Change-Id: I052bf96fd5a5780c1930da5b3a52b7a8dbebea46 Reviewed-on: https://go-review.googlesource.com/c/go/+/612057 Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Tim King <taking@google.com> Auto-Submit: Tim King <taking@google.com>
Diffstat (limited to 'src/net/http')
-rw-r--r--src/net/http/http_test.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/net/http/http_test.go b/src/net/http/http_test.go
index df9812fc94..777634bbb2 100644
--- a/src/net/http/http_test.go
+++ b/src/net/http/http_test.go
@@ -151,9 +151,7 @@ var forbiddenStringsFunctions = map[string]bool{
// strings and bytes package functions. HTTP is mostly ASCII based, and doing
// Unicode-aware case folding or space stripping can introduce vulnerabilities.
func TestNoUnicodeStrings(t *testing.T) {
- if !testenv.HasSrc() {
- t.Skip("source code not available")
- }
+ testenv.MustHaveSource(t)
re := regexp.MustCompile(`(strings|bytes).([A-Za-z]+)`)
if err := fs.WalkDir(os.DirFS("."), ".", func(path string, d fs.DirEntry, err error) error {