mirror of
https://github.com/golang/go
synced 2024-11-11 22:20:22 -07:00
cmd/go: add a control case to the mod_vendor_trimpath test
In reviewing CL 215940, it took me a while to find the control condition for the test, which was located in build_cache_trimpath.txt. We could consolidate the two tests, but since they check for regressions of separate issues (with separate root-causes), I think it makes sense to keep them separate. However, I would like the control condition to be present in the same source file, so that we'll be more likely to update both cases if the behavior of one of them is changed. Updates #36566 Change-Id: Ic588f1dfb7977dd78d1d5ef61b9841e22bad82e6 Reviewed-on: https://go-review.googlesource.com/c/go/+/216018 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
This commit is contained in:
parent
8689ea6a4a
commit
39ea3d0a23
@ -18,8 +18,13 @@ stdout vendor
|
||||
|
||||
# With -trimpath, everything before the package path should be trimmed.
|
||||
# As with -mod=mod, the version should appear as part of the module path.
|
||||
go run -trimpath main.go
|
||||
stdout example.com/stack@v1.0.0/stack.go
|
||||
go run -mod=vendor -trimpath main.go
|
||||
stdout '^example.com/stack@v1.0.0/stack.go$'
|
||||
|
||||
# With pristinely vendored source code, a trimmed binary built from vendored
|
||||
# code should have the same behavior as one build from the module cache.
|
||||
go run -mod=mod -trimpath main.go
|
||||
stdout '^example.com/stack@v1.0.0/stack.go$'
|
||||
|
||||
-- go.mod --
|
||||
module example.com/main
|
||||
|
Loading…
Reference in New Issue
Block a user