2012-02-16 21:48:24 -07:00
|
|
|
# Copyright 2012 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.
|
|
|
|
|
|
|
|
# These function names are also known to
|
|
|
|
# (and are the plan for transitioning to) run.go.
|
|
|
|
|
|
|
|
compile() {
|
|
|
|
$G $D/$F.go
|
|
|
|
}
|
|
|
|
|
2012-07-30 13:12:05 -06:00
|
|
|
compiledir() {
|
|
|
|
for gofile in $D/$F.dir/*.go
|
|
|
|
do
|
|
|
|
$G ${gofile} || return 1
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2012-02-16 21:48:24 -07:00
|
|
|
build() {
|
|
|
|
$G $D/$F.go && $L $F.$A
|
|
|
|
}
|
|
|
|
|
2012-04-20 09:45:43 -06:00
|
|
|
runoutput() {
|
|
|
|
go run "$D/$F.go" > tmp.go
|
|
|
|
go run tmp.go
|
|
|
|
}
|
|
|
|
|
2012-02-16 21:48:24 -07:00
|
|
|
run() {
|
2012-03-06 23:54:39 -07:00
|
|
|
gofiles=""
|
|
|
|
ingo=true
|
|
|
|
while $ingo; do
|
|
|
|
case "$1" in
|
|
|
|
*.go)
|
|
|
|
gofiles="$gofiles $1"
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
ingo=false
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2012-03-07 12:16:58 -07:00
|
|
|
$G $D/$F.go $gofiles && $L $F.$A && ./$A.out "$@"
|
2012-02-16 21:48:24 -07:00
|
|
|
}
|
|
|
|
|
2012-02-23 19:17:26 -07:00
|
|
|
cmpout() {
|
|
|
|
$G $D/$F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
|
|
|
|
}
|
|
|
|
|
2012-02-16 21:48:24 -07:00
|
|
|
errorcheck() {
|
|
|
|
errchk $G -e $D/$F.go
|
|
|
|
}
|
2012-03-21 12:14:44 -06:00
|
|
|
|
|
|
|
skip() {
|
|
|
|
true
|
|
|
|
}
|