Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
e9bcbc53
Commit
e9bcbc53
authored
Jul 15, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
os: use /tmp again
R=adg CC=golang-dev
https://golang.org/cl/1823041
parent
9028d6bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
os_test.go
src/pkg/os/os_test.go
+8
-1
No files found.
src/pkg/os/os_test.go
View file @
e9bcbc53
...
@@ -11,6 +11,7 @@ import (
...
@@ -11,6 +11,7 @@ import (
"io/ioutil"
"io/ioutil"
.
"os"
.
"os"
"strings"
"strings"
"syscall"
"testing"
"testing"
)
)
...
@@ -56,7 +57,13 @@ func size(name string, t *testing.T) int64 {
...
@@ -56,7 +57,13 @@ func size(name string, t *testing.T) int64 {
func
newFile
(
testName
string
,
t
*
testing
.
T
)
(
f
*
File
)
{
func
newFile
(
testName
string
,
t
*
testing
.
T
)
(
f
*
File
)
{
// Use a local file system, not NFS.
// Use a local file system, not NFS.
f
,
err
:=
ioutil
.
TempFile
(
""
,
"_Go_"
+
testName
)
// On Unix, override $TMPDIR in case the user
// has it set to an NFS-mounted directory.
dir
:=
""
if
syscall
.
OS
!=
"windows"
{
dir
=
"/tmp"
}
f
,
err
:=
ioutil
.
TempFile
(
dir
,
"_Go_"
+
testName
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatalf
(
"open %s: %s"
,
testName
,
err
)
t
.
Fatalf
(
"open %s: %s"
,
testName
,
err
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment