github.com/lingyao2333/mo-zero@v1.4.1/core/fs/files_test.go (about)

     1  package fs
     2  
     3  import (
     4  	"os"
     5  	"testing"
     6  
     7  	"github.com/stretchr/testify/assert"
     8  )
     9  
    10  func TestCloseOnExec(t *testing.T) {
    11  	file := os.NewFile(0, os.DevNull)
    12  	assert.NotPanics(t, func() {
    13  		CloseOnExec(file)
    14  	})
    15  }