We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3da796 commit 11cdce9Copy full SHA for 11cdce9
tests/testutil.go
@@ -5,6 +5,7 @@ import (
5
"github.com/stretchr/testify/assert"
6
"github.com/stretchr/testify/require"
7
lua "github.com/yuin/gopher-lua"
8
+ "io/ioutil"
9
"os"
10
"strings"
11
"testing"
@@ -99,7 +100,8 @@ func tTempDir(L *lua.LState) int {
99
100
t := checkT(L, 1)
101
// TODO(scr): When the minimal version supported has this on the *testing.T object, remove this shim
102
//L.Push(lua.LString(t.TempDir()))
- tempDir := os.TempDir()
103
+ tempDir, err := ioutil.TempDir(os.TempDir(), "test.tempDir*")
104
+ require.NoError(t, err)
105
t.Cleanup(func() {
106
_ = os.RemoveAll(tempDir)
107
})
0 commit comments