Feat: {path} marker in name rule representing the virtual path of the file

This commit is contained in:
HFO4
2019-11-19 16:42:36 +08:00
parent 2e9f256462
commit 88a543ef74
8 changed files with 71 additions and 33 deletions

14
pkg/util/path_test.go Normal file
View 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"))
}