go-zero/core/fs/files_test.go

16 lines
208 B
Go
Raw Normal View History

2022-10-23 10:54:41 +08:00
package fs
import (
"os"
"testing"
"github.com/stretchr/testify/assert"
)
func TestCloseOnExec(t *testing.T) {
file := os.NewFile(0, os.DevNull)
assert.NotPanics(t, func() {
CloseOnExec(file)
})
}