mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-18 19:44:00 +00:00
os_test.go: use CreateTemp now that it is implemented
This commit is contained in:
+1
-2
@@ -17,8 +17,7 @@ func localTmp() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func newFile(testName string, t *testing.T) (f *File) {
|
func newFile(testName string, t *testing.T) (f *File) {
|
||||||
// TODO: use CreateTemp when it lands
|
f, err := CreateTemp("", testName)
|
||||||
f, err := OpenFile(TempDir()+"/_Go_"+testName, O_RDWR|O_CREATE, 0644)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("TempFile %s: %s", testName, err)
|
t.Fatalf("TempFile %s: %s", testName, err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user