From: Rob Pike Date: Tue, 26 Oct 2010 00:03:25 +0000 (-0700) Subject: gotest: generate correct gofmt-formatted _testmain.go X-Git-Tag: weekly.2010-10-27~24 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=5556f733c7da81dbf61b246f2ea6375d8c6398fb;p=gostls13.git gotest: generate correct gofmt-formatted _testmain.go Fixes #1225. R=adg CC=golang-dev https://golang.org/cl/2729041 --- diff --git a/src/cmd/gotest/gotest b/src/cmd/gotest/gotest index e634a11089..32b4aa538d 100755 --- a/src/cmd/gotest/gotest +++ b/src/cmd/gotest/gotest @@ -149,24 +149,24 @@ importpath=$(gomake -s importpath) echo 'import "testing"' # test array echo - echo 'var tests = []testing.Test {' + echo 'var tests = []testing.Test{' for i in $tests do - echo ' testing.Test{ "'$i'", '$i' },' + echo ' testing.Test{"'$i'", '$i'},' done echo '}' # benchmark array - echo 'var benchmarks = []testing.Benchmark {' + echo 'var benchmarks = []testing.Benchmark{' for i in $benchmarks do - echo ' testing.Benchmark{ "'$i'", '$i' },' + echo ' testing.Benchmark{"'$i'", '$i'},' done echo '}' # body echo echo 'func main() {' - echo ' testing.Main(tests);' + echo ' testing.Main(tests)' echo ' testing.RunBenchmarks(benchmarks)' echo '}' }>_testmain.go