]> Cypherpunks.ru repositories - gostls13.git/commitdiff
test: add cmpout to testlib
authorBrad Fitzpatrick <bradfitz@golang.org>
Fri, 24 Feb 2012 02:17:26 +0000 (13:17 +1100)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 24 Feb 2012 02:17:26 +0000 (13:17 +1100)
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5699060

test/deferprint.go
test/fixedbugs/bug328.go
test/fixedbugs/bug409.go
test/goprint.go
test/helloworld.go
test/ken/cplx0.go
test/ken/string.go
test/printbig.go
test/run.go
test/testlib

index eab7ed465598165ac25cdd3739560bd46f536d46..72c98b19fc960246cce7426bf875f1656b9f9ad7 100644 (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
index 825298371f969d03ab2e48e1ece03fb335f3afff..73ab46d4591ef232cc885c44aa5f5c135e3e3e11 100644 (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
index 884d33370879a65f8d6718dca6f4432de6c2ac59..1dca43b7ae445291c17d14983a673fdc4bc69d1e 100644 (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
index 3fe08f307791bde55f2ce29e45df9668d40ce1cf..2f0d3c3904d80553d2f18eae97c1f07a15269277 100644 (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
index 9c33cab3bead337eb60b9156ebbc70e57e198476..5025ec9bb350b85220d867180f931cbe04080f74 100644 (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
index f38ce5b65d11007b3ba071ec8365bbbe427ca381..912b8c489b3d1fae9a58667096ba4574ea5a58bb 100644 (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
index e0510824293221abb38fedf12961d5ac8e30c82a..9bd905d3d92e2abb204522e91fb46cecac0e8e98 100644 (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
index 6985796f3abc46fa21c96f08e92f018ca2add696..5693c58d4f6a35407acff36e6e29daf9e24135de 100644 (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
index 4d4488a457d2271db61190c8c440bbf4e9436ae3..3ba35f9d4277940d781f6db3e2553fc953cc9015 100644 (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:
index ea8c5d74e0982b4d9d34cba9094e6424c80434ae..2e4fefc8cb393c121541644c6a9262c11deec213 100644 (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
 }