github.com/TeaOSLab/EdgeNode@v1.3.8/internal/utils/fs/os_test.go (about)

     1  // Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
     2  
     3  package fsutils_test
     4  
     5  import (
     6  	fsutils "github.com/TeaOSLab/EdgeNode/internal/utils/fs"
     7  	"os"
     8  	"testing"
     9  )
    10  
    11  func TestOpenFile(t *testing.T) {
    12  	f, err := fsutils.OpenFile("./os_test.go", os.O_RDONLY, 0444)
    13  	if err != nil {
    14  		t.Fatal(err)
    15  	}
    16  	_ = f.Close()
    17  }