This commit is contained in:
Joe
2026-01-16 15:49:34 +08:00
commit 550d3e1f42
380 changed files with 62024 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
//go:build linux
// +build linux
package unit
import (
"fmt"
"strings"
"testing"
"github.com/goravel/framework/support/path"
"github.com/stretchr/testify/assert"
)
func TestPathResource(t *testing.T) {
resourcePath := path.Resource()
fmt.Println(resourcePath)
assert.True(t, strings.HasPrefix(resourcePath, "/"))
assert.True(t, strings.HasSuffix(resourcePath, "/resources"))
resourcePath = path.Resource("test.txt")
fmt.Println(resourcePath)
assert.True(t, strings.HasPrefix(resourcePath, "/"))
assert.True(t, strings.HasSuffix(resourcePath, "/resources/test.txt"))
}