1
0
mirror of https://github.com/golang/go synced 2024-11-24 05:20:04 -07:00

test: add cmpout to testlib

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5699060
This commit is contained in:
Brad Fitzpatrick 2012-02-24 13:17:26 +11:00
parent 5cff029993
commit e014cf0e54
10 changed files with 15 additions and 8 deletions

View File

@ -1,4 +1,4 @@
// $G $D/$F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
// cmpout
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style

View File

@ -1,4 +1,4 @@
// $G $D/$F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
// cmpout
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style

View File

@ -1,4 +1,4 @@
// $G $D/$F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
// cmpout
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style

View File

@ -1,4 +1,4 @@
// $G $D/$F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
// cmpout
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style

View File

@ -1,4 +1,4 @@
// $G $F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
// cmpout
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style

View File

@ -1,4 +1,4 @@
// $G $D/$F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
// cmpout
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style

View File

@ -1,4 +1,4 @@
// $G $D/$F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
// cmpout
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style

View File

@ -1,4 +1,4 @@
// $G $F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
// cmpout
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style

View File

@ -238,6 +238,9 @@ func (t *test) run() {
action = strings.TrimSpace(action)
switch action {
case "cmpout":
action = "run" // the run case already looks for <dir>/<test>.out files
fallthrough
case "compile", "build", "run", "errorcheck":
t.action = action
default:

View File

@ -17,6 +17,10 @@ run() {
$G $D/$F.go && $L $F.$A && ./$A.out "$@"
}
cmpout() {
$G $D/$F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
}
errorcheck() {
errchk $G -e $D/$F.go
}