...

Text file src/cmd/go/testdata/script/devnull.txt

Documentation: cmd/go/testdata/script

     1env 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.
     5cd x
     6cmp $devnull $WORK/empty.txt
     7go test -o=$devnull -c
     8! exists x.test$GOEXE
     9cmp $devnull $WORK/empty.txt
    10
    11# Issue 12407: go build -o /dev/null should succeed.
    12cd ..
    13go build -o $devnull y
    14cmp $devnull $WORK/empty.txt
    15
    16-- x/x_test.go --
    17package x_test
    18import (
    19    "testing"
    20)
    21func TestNUL(t *testing.T) {
    22}
    23-- y/y.go --
    24package y
    25func main() {}
    26-- $WORK/empty.txt --

View as plain text