LEFT | RIGHT |
(no file at all) | |
1 # Copyright 2013 The Go Authors. All rights reserved. | 1 # Copyright 2013 The Go Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style | 2 # Use of this source code is governed by a BSD-style |
3 # license that can be found in the LICENSE file. | 3 # license that can be found in the LICENSE file. |
4 | 4 |
5 check() { | 5 check() { |
6 file=$1 | 6 file=$1 |
7 line=$(grep -n 'ERROR HERE' $file | sed 's/:.*//') | 7 line=$(grep -n 'ERROR HERE' $file | sed 's/:.*//') |
8 if [ "$line" = "" ]; then | 8 if [ "$line" = "" ]; then |
9 echo 1>&2 misc/cgo/errors/test.bash: BUG: cannot find ERROR HERE
in $file | 9 echo 1>&2 misc/cgo/errors/test.bash: BUG: cannot find ERROR HERE
in $file |
10 exit 1 | 10 exit 1 |
11 fi | 11 fi |
12 if go build $file >errs 2>&1; then | 12 if go build $file >errs 2>&1; then |
13 echo 1>&2 misc/cgo/errors/test.bash: BUG: expected cgo to fail b
ut it succeeded | 13 echo 1>&2 misc/cgo/errors/test.bash: BUG: expected cgo to fail b
ut it succeeded |
14 exit 1 | 14 exit 1 |
15 fi | 15 fi |
16 if ! test -s errs; then | 16 if ! test -s errs; then |
17 echo 1>&2 misc/cgo/errors/test.bash: BUG: expected error output
but saw none | 17 echo 1>&2 misc/cgo/errors/test.bash: BUG: expected error output
but saw none |
18 exit 1 | 18 exit 1 |
19 fi | 19 fi |
20 if ! fgrep $file:$line: errs >/dev/null 2>&1; then | 20 if ! fgrep $file:$line: errs >/dev/null 2>&1; then |
21 echo 1>&2 misc/cgo/errors/test.bash: BUG: expected error on line
$line but saw: | 21 echo 1>&2 misc/cgo/errors/test.bash: BUG: expected error on line
$line but saw: |
22 cat 1>&2 errs | 22 cat 1>&2 errs |
23 exit 1 | 23 exit 1 |
24 fi | 24 fi |
25 } | 25 } |
26 | 26 |
27 check err1.go | 27 check err1.go |
28 check err2.go | 28 check err2.go |
29 check err3.go | 29 check err3.go |
| 30 check issue7757.go |
| 31 check issue8442.go |
30 | 32 |
31 rm -rf errs _obj | 33 rm -rf errs _obj |
32 exit 0 | 34 exit 0 |
LEFT | RIGHT |