github.com/varialus/godfly@v0.0.0-20130904042352-1934f9f095ab/misc/cgo/errors/test.bash (about) 1 # Copyright 2013 The Go Authors. All rights reserved. 2 # Use of this source code is governed by a BSD-style 3 # license that can be found in the LICENSE file. 4 5 if go tool cgo err1.go >errs 2>&1; then 6 echo 1>&2 misc/cgo/errors/test.bash: BUG: expected cgo to fail but it succeeded 7 exit 1 8 fi 9 if ! test -s errs; then 10 echo 1>&2 misc/cgo/errors/test.bash: BUG: expected error output but saw none 11 exit 1 12 fi 13 if ! fgrep err1.go:7 errs >/dev/null 2>&1; then 14 echo 1>&2 misc/cgo/errors/test.bash: BUG: expected error on line 7 but saw: 15 cat 1>&2 errs 16 exit 1 17 fi 18 rm -rf errs _obj 19 exit 0