From 9dabf8b0d4286f37f75289f188edafb77d86b54d Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Wed, 18 Feb 2026 15:02:11 -0500 Subject: cmd/golangorg: include GOROOT/doc files in TestAll checks Most of the go.dev content is in the _content directory of x/website, but some of the pages (e.g., go_spec.html, asm.html, godebug.md, etc.) canonically live in the main Go repository. Extend TestAll to help catch problems automatically in those files too. For golang/go#78211. Change-Id: I48ac3f8b2338ef1300461a860fe2cc4c2c30ac02 Reviewed-on: https://go-review.googlesource.com/c/website/+/746740 Reviewed-by: Alan Donovan Auto-Submit: Dmitri Shuralyov Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI --- cmd/golangorg/server_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/golangorg/server_test.go b/cmd/golangorg/server_test.go index ec2d2f73..be655657 100644 --- a/cmd/golangorg/server_test.go +++ b/cmd/golangorg/server_test.go @@ -118,6 +118,11 @@ func TestAll(t *testing.T) { "/talks/2013/highperf/", "/talks/2016/refactor/", "/tour/static/partials/", + + // The "next" directory in GOROOT/doc goes through + // a fragment merging process, not served directly. + // See https://go.dev/cs/go/+/HEAD:doc/README.md. + "/doc/next/", } // Only check and report a URL the first time we see it. @@ -251,6 +256,7 @@ func TestAll(t *testing.T) { } testTree("../../_content", "https://go.dev") + testTree(filepath.Join(runtime.GOROOT(), "doc"), "https://go.dev/doc") } // fixURL returns the corrected URL for u, -- cgit v1.3