aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/exec/exec_test.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2009-12-15 15:27:16 -0800
committerRobert Griesemer <gri@golang.org>2009-12-15 15:27:16 -0800
commit1c729599996c05e7b743372baeec2b6c70472084 (patch)
treeac58cd99d0372dc003896650059425a8f6281750 /src/pkg/exec/exec_test.go
parentd122bb2193cfb239efc1d9a3e63d4bb0b0635b3d (diff)
downloadgo-1c729599996c05e7b743372baeec2b6c70472084.tar.xz
1) Change default gofmt default settings for
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 2nd set of files. R=rsc CC=golang-dev https://golang.org/cl/179067
Diffstat (limited to 'src/pkg/exec/exec_test.go')
-rw-r--r--src/pkg/exec/exec_test.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/pkg/exec/exec_test.go b/src/pkg/exec/exec_test.go
index 5a997fd199..9c4d2ee319 100644
--- a/src/pkg/exec/exec_test.go
+++ b/src/pkg/exec/exec_test.go
@@ -5,20 +5,20 @@
package exec
import (
- "io";
- "io/ioutil";
- "testing";
+ "io"
+ "io/ioutil"
+ "testing"
)
func TestRunCat(t *testing.T) {
cmd, err := Run("/bin/cat", []string{"cat"}, nil,
- Pipe, Pipe, DevNull);
+ Pipe, Pipe, DevNull)
if err != nil {
t.Fatalf("opencmd /bin/cat: %v", err)
}
- io.WriteString(cmd.Stdin, "hello, world\n");
- cmd.Stdin.Close();
- buf, err := ioutil.ReadAll(cmd.Stdout);
+ io.WriteString(cmd.Stdin, "hello, world\n")
+ cmd.Stdin.Close()
+ buf, err := ioutil.ReadAll(cmd.Stdout)
if err != nil {
t.Fatalf("reading from /bin/cat: %v", err)
}
@@ -32,11 +32,11 @@ func TestRunCat(t *testing.T) {
func TestRunEcho(t *testing.T) {
cmd, err := Run("/bin/echo", []string{"echo", "hello", "world"}, nil,
- DevNull, Pipe, DevNull);
+ DevNull, Pipe, DevNull)
if err != nil {
t.Fatalf("opencmd /bin/echo: %v", err)
}
- buf, err := ioutil.ReadAll(cmd.Stdout);
+ buf, err := ioutil.ReadAll(cmd.Stdout)
if err != nil {
t.Fatalf("reading from /bin/echo: %v", err)
}