1
0
mirror of https://github.com/golang/go synced 2024-11-21 12:44:40 -07:00

test: use testlib in a few more cases

Introduce a new skip cmd.

R=golang-dev, bradfitz, iant, iant
CC=golang-dev
https://golang.org/cl/5868048
This commit is contained in:
Shenghou Ma 2012-03-22 02:14:44 +08:00
parent 3a3c5aad4e
commit e2662835b8
11 changed files with 19 additions and 10 deletions

View File

@ -51,6 +51,7 @@ main(void)
int i, j, k, l;
double complex n, d, q;
printf("// skip\n");
printf("// # generated by cmplxdivide.c\n");
printf("\n");
printf("package main\n");

View File

@ -1,3 +1,4 @@
// skip
// # generated by cmplxdivide.c
package main

View File

@ -1,4 +1,4 @@
// true
// skip
// 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) | grep 'initialization loop' >/dev/null || echo BUG: bug223
// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@ -18,4 +18,4 @@ func f() {
}
}
var m = map[string]F{"f": f}
var m = map[string]F{"f": f} // ERROR "initialization loop"

View File

@ -1,4 +1,4 @@
// true # used by import3
// skip # used by import3
// 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 @@
// true # used by embed1.go
// skip # used by embed1.go
// 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 @@
// true # used by private.go
// skip # used by private.go
// 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 @@
// true # used by recursive2
// skip # used by recursive2
// 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 @@
// true
// skip
// 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 @@
// #ignore
// skip
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@ -172,7 +172,7 @@ type test struct {
donec chan bool // closed when done
src string
action string // "compile", "build", "run", "errorcheck"
action string // "compile", "build", "run", "errorcheck", "skip"
tempDir string
err error
@ -253,6 +253,9 @@ func (t *test) run() {
fallthrough
case "compile", "build", "run", "errorcheck":
t.action = action
case "skip":
t.action = "skip"
return
default:
t.err = skipError("skipped; unknown pattern: " + action)
t.action = "??"

View File

@ -38,3 +38,7 @@ cmpout() {
errorcheck() {
errchk $G -e $D/$F.go
}
skip() {
true
}