summaryrefslogtreecommitdiff
path: root/src/pkg/os/os_test.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-06-29 15:24:23 -0700
committerRuss Cox <rsc@golang.org>2009-06-29 15:24:23 -0700
commit755e009ad2a874373454d488f9ea46648a8a9547 (patch)
treeed3d700304a76b08cdca0f356605077c58ee0f76 /src/pkg/os/os_test.go
parent24323437280c7f0a166b7f2fae75620470cde0f9 (diff)
downloadgolang-755e009ad2a874373454d488f9ea46648a8a9547.tar.gz
io.StringBytes -> strings.Bytes
io.ByteBuffer -> bytes.Buffer left io.ByteBuffer stub around for now, for protocol compiler. R=r OCL=30861 CL=30872
Diffstat (limited to 'src/pkg/os/os_test.go')
-rw-r--r--src/pkg/os/os_test.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/pkg/os/os_test.go b/src/pkg/os/os_test.go
index 3dd975660..8b50cb508 100644
--- a/src/pkg/os/os_test.go
+++ b/src/pkg/os/os_test.go
@@ -5,9 +5,11 @@
package os
import (
+ "bytes";
"fmt";
"io";
"os";
+ "strings";
"testing";
)
@@ -322,7 +324,7 @@ func TestForkExec(t *testing.T) {
}
w.Close();
- var b io.ByteBuffer;
+ var b bytes.Buffer;
io.Copy(r, &b);
output := string(b.Data());
expect := "/\n";
@@ -443,7 +445,7 @@ func TestTruncate(t *testing.T) {
}
checkSize(t, Path, 0);
- fd.Write(io.StringBytes("hello, world\n"));
+ fd.Write(strings.Bytes("hello, world\n"));
checkSize(t, Path, 13);
fd.Truncate(10);
checkSize(t, Path, 10);
@@ -451,7 +453,7 @@ func TestTruncate(t *testing.T) {
checkSize(t, Path, 1024);
fd.Truncate(0);
checkSize(t, Path, 0);
- fd.Write(io.StringBytes("surprise!"));
+ fd.Write(strings.Bytes("surprise!"));
checkSize(t, Path, 13 + 9); // wrote at offset past where hello, world was.
fd.Close();
Remove(Path);
@@ -600,7 +602,7 @@ func run(t *testing.T, cmd []string) string {
}
w.Close();
- var b io.ByteBuffer;
+ var b bytes.Buffer;
io.Copy(r, &b);
Wait(pid, 0);
output := string(b.Data());
@@ -626,4 +628,3 @@ func TestHostname(t *testing.T) {
t.Errorf("Hostname() = %q, want %q", hostname, want);
}
}
-