mirror of
https://github.com/golang/go
synced 2024-11-17 08:04:46 -07:00
Add go.mod and Module=ON to test script, change directories for tests
This commit is contained in:
parent
ec8fe14249
commit
e0964983e1
@ -1,7 +1,8 @@
|
||||
env GO111MODULE=on
|
||||
# Check for correct naming of temporary executable
|
||||
|
||||
#Test for single file specified
|
||||
cd m/x/y/z/
|
||||
cd x/y/z
|
||||
go run foo.go
|
||||
stderr 'foo'
|
||||
|
||||
@ -23,7 +24,7 @@ func main() {
|
||||
println(filepath.Base(os.Args[0]))
|
||||
}
|
||||
|
||||
-- m/x/y/z/foo.go --
|
||||
-- x/y/z/foo.go --
|
||||
package main
|
||||
import(
|
||||
"os"
|
||||
@ -33,7 +34,7 @@ func main() {
|
||||
println(filepath.Base(os.Args[0]))
|
||||
}
|
||||
|
||||
-- m/x/y/z/foo.go --
|
||||
-- x/y/z/foo.go --
|
||||
package main
|
||||
import(
|
||||
"os"
|
||||
@ -43,3 +44,5 @@ func main() {
|
||||
println(filepath.Base(os.Args[0]))
|
||||
}
|
||||
|
||||
-- go.mod --
|
||||
module m
|
Loading…
Reference in New Issue
Block a user