| # Copyright 2013 The Go Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style |
| # license that can be found in the LICENSE file. |
| line=$(grep -n 'ERROR HERE' $file | sed 's/:.*//') |
| if [ "$line" = "" ]; then |
| echo 1>&2 misc/cgo/errors/test.bash: BUG: cannot find ERROR HERE in $file |
| if go build $file >errs 2>&1; then |
| echo 1>&2 misc/cgo/errors/test.bash: BUG: expected cgo to fail but it succeeded |
| echo 1>&2 misc/cgo/errors/test.bash: BUG: expected error output but saw none |
| if ! fgrep $file:$line: errs >/dev/null 2>&1; then |
| echo 1>&2 misc/cgo/errors/test.bash: BUG: expected error on line $line but saw: |