diff options
Diffstat (limited to 'src/pkg/os/os_test.go')
-rw-r--r-- | src/pkg/os/os_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/os/os_test.go b/src/pkg/os/os_test.go index 45e101d88..f711f73a5 100644 --- a/src/pkg/os/os_test.go +++ b/src/pkg/os/os_test.go @@ -326,7 +326,7 @@ func TestForkExec(t *testing.T) { var b bytes.Buffer; io.Copy(r, &b); - output := string(b.Bytes()); + output := b.String(); expect := "/\n"; if output != expect { t.Errorf("exec /bin/pwd returned %q wanted %q", output, expect); @@ -605,7 +605,7 @@ func run(t *testing.T, cmd []string) string { var b bytes.Buffer; io.Copy(r, &b); Wait(pid, 0); - output := string(b.Bytes()); + output := b.String(); if n := len(output); n > 0 && output[n-1] == '\n' { output = output[0:n-1]; } |