mirror of
https://github.com/golang/go
synced 2024-11-25 02:57:57 -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:
parent
3a3c5aad4e
commit
e2662835b8
@ -51,6 +51,7 @@ main(void)
|
|||||||
int i, j, k, l;
|
int i, j, k, l;
|
||||||
double complex n, d, q;
|
double complex n, d, q;
|
||||||
|
|
||||||
|
printf("// skip\n");
|
||||||
printf("// # generated by cmplxdivide.c\n");
|
printf("// # generated by cmplxdivide.c\n");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf("package main\n");
|
printf("package main\n");
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// skip
|
||||||
// # generated by cmplxdivide.c
|
// # generated by cmplxdivide.c
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// true
|
// skip
|
||||||
|
|
||||||
// Copyright 2010 The Go Authors. All rights reserved.
|
// Copyright 2010 The Go Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
|
@ -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.
|
// Copyright 2009 The Go Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a BSD-style
|
// 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"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// true # used by import3
|
// skip # used by import3
|
||||||
|
|
||||||
// Copyright 2010 The Go Authors. All rights reserved.
|
// Copyright 2010 The Go Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// true # used by embed1.go
|
// skip # used by embed1.go
|
||||||
|
|
||||||
// Copyright 2009 The Go Authors. All rights reserved.
|
// Copyright 2009 The Go Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// true # used by private.go
|
// skip # used by private.go
|
||||||
|
|
||||||
// Copyright 2011 The Go Authors. All rights reserved.
|
// Copyright 2011 The Go Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// true # used by recursive2
|
// skip # used by recursive2
|
||||||
|
|
||||||
// Copyright 2012 The Go Authors. All rights reserved.
|
// Copyright 2012 The Go Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// true
|
// skip
|
||||||
|
|
||||||
// Copyright 2012 The Go Authors. All rights reserved.
|
// Copyright 2012 The Go Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// #ignore
|
// skip
|
||||||
|
|
||||||
// Copyright 2012 The Go Authors. All rights reserved.
|
// Copyright 2012 The Go Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
@ -172,7 +172,7 @@ type test struct {
|
|||||||
donec chan bool // closed when done
|
donec chan bool // closed when done
|
||||||
|
|
||||||
src string
|
src string
|
||||||
action string // "compile", "build", "run", "errorcheck"
|
action string // "compile", "build", "run", "errorcheck", "skip"
|
||||||
|
|
||||||
tempDir string
|
tempDir string
|
||||||
err error
|
err error
|
||||||
@ -253,6 +253,9 @@ func (t *test) run() {
|
|||||||
fallthrough
|
fallthrough
|
||||||
case "compile", "build", "run", "errorcheck":
|
case "compile", "build", "run", "errorcheck":
|
||||||
t.action = action
|
t.action = action
|
||||||
|
case "skip":
|
||||||
|
t.action = "skip"
|
||||||
|
return
|
||||||
default:
|
default:
|
||||||
t.err = skipError("skipped; unknown pattern: " + action)
|
t.err = skipError("skipped; unknown pattern: " + action)
|
||||||
t.action = "??"
|
t.action = "??"
|
||||||
|
@ -38,3 +38,7 @@ cmpout() {
|
|||||||
errorcheck() {
|
errorcheck() {
|
||||||
errchk $G -e $D/$F.go
|
errchk $G -e $D/$F.go
|
||||||
}
|
}
|
||||||
|
|
||||||
|
skip() {
|
||||||
|
true
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user