mirror of
https://github.com/cloudreve/cloudreve.git
synced 2025-11-01 10:36:30 +08:00
Feat: {path} marker in name rule representing the virtual path of the file
This commit is contained in:
14
pkg/util/path_test.go
Normal file
14
pkg/util/path_test.go
Normal file
@ -0,0 +1,14 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestDotPathToStandardPath(t *testing.T) {
|
||||
asserts := assert.New(t)
|
||||
|
||||
asserts.Equal("/", DotPathToStandardPath(""))
|
||||
asserts.Equal("/目录", DotPathToStandardPath("目录"))
|
||||
asserts.Equal("/目录/目录2", DotPathToStandardPath("目录,目录2"))
|
||||
}
|
||||
Reference in New Issue
Block a user