files_test.go 208 B

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