1 env GO111MODULE=off
2
3 # Issue 28035: go test -c -o NUL should work.
4 # Issue 28549: go test -c -o /dev/null should not overwrite /dev/null when run as root.
5 cd x
6 cmp $devnull $WORK/empty.txt
7 go test -o=$devnull -c
8 ! exists x.test$GOEXE
9 cmp $devnull $WORK/empty.txt
10
11 # Issue 12407: go build -o /dev/null should succeed.
12 cd ..
13 go build -o $devnull y
14 cmp $devnull $WORK/empty.txt
15
16 -- x/x_test.go --
17 package x_test
18 import (
19 "testing"
20 )
21 func TestNUL(t *testing.T) {
22 }
23 -- y/y.go --
24 package y
25 func main() {}
26 -- $WORK/empty.txt --
27
View as plain text