3 # Copyright 2013 The Go Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style
5 # license that can be found in the LICENSE file.
9 line
=$
(grep -n 'ERROR HERE' $file |
sed 's/:.*//')
10 if [ "$line" = "" ]; then
11 echo 1>&2 misc
/cgo
/errors
/test.bash
: BUG
: cannot
find ERROR HERE
in $file
14 expect
$file $file:$line:
20 if go build
-gcflags=-C $file >errs
2>&1; then
21 echo 1>&2 misc
/cgo
/errors
/test.bash
: BUG
: expected cgo to fail on
$file but it succeeded
24 if ! test -s errs
; then
25 echo 1>&2 misc
/cgo
/errors
/test.bash
: BUG
: expected error output
for $file but saw none
29 if ! fgrep
$error errs
>/dev
/null
2>&1; then
30 echo 1>&2 misc
/cgo
/errors
/test.bash
: BUG
: expected error output
for $file to contain
\"$error\" but saw
:
44 expect issue13129.go C.ushort
46 expect issue13635.go C.uchar C.schar C.ushort C.uint C.ulong C.longlong C.ulonglong C.complexfloat C.complexdouble
51 expect issue18452.go issue18452.go
:16 issue18452.go
:17
53 if ! go build issue14669.go
; then
56 if ! CGO_CFLAGS
="-O" go build issue14669.go
; then
60 if ! go run ptr.go
; then
64 # The malloc.go test should crash.
66 if go run malloc.go
>malloc.out
2>&1; then
67 echo '`go run malloc.go` succeeded unexpectedly'