-
Notifications
You must be signed in to change notification settings - Fork 17.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/go: convert TestPackageMainTestImportsArchiveNotBinary to a scrip…
…t test Updates #28387 Updates #30316 Change-Id: I31e04c89f2cc226f9b5110f14c8b80a18e937efb Reviewed-on: https://go-review.googlesource.com/c/go/+/207960 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
- Loading branch information
Bryan C. Mills
committed
Nov 19, 2019
1 parent
9ebd254
commit 992d2e5
Showing
4 changed files
with
32 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
env GO111MODULE=off | ||
|
||
# Test that a main_test of 'package main' imports the package, | ||
# not the installed binary. | ||
|
||
[short] skip | ||
|
||
env GOBIN=$WORK/bin | ||
go test main_test | ||
go install main_test | ||
|
||
go list -f '{{.Stale}}' main_test | ||
stdout false | ||
|
||
go test main_test | ||
|
||
-- main_test/m.go -- | ||
package main | ||
|
||
func F() {} | ||
func main() {} | ||
-- main_test/m_test.go -- | ||
package main_test | ||
|
||
import ( | ||
. "main_test" | ||
"testing" | ||
) | ||
|
||
func Test1(t *testing.T) { | ||
F() | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.