...

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

Documentation: cmd/go/testdata/script

     1[short] skip
     2[!cgo] skip
     3
     4env GOCACHE=$WORK/gocache  # Looking for compile flags, so need a clean cache.
     5go build -x -n main.go
     6stderr '"-I[^"]+c flags"' # find quoted c flags
     7! stderr '"-I[^"]+c flags".*"-I[^"]+c flags"' # don't find too many quoted c flags per line
     8stderr '"-L[^"]+ld flags"' # find quoted ld flags
     9! stderr '"-L[^"]+c flags".*"-L[^"]+c flags"' # don't find too many quoted ld flags per line
    10
    11-- main.go --
    12package main
    13// #cgo CFLAGS: -I"c flags"
    14// #cgo LDFLAGS: -L"ld flags"
    15import "C"
    16func main() {}

View as plain text