Test: util / filesystem

This commit is contained in:
HFO4
2019-12-05 19:01:51 +08:00
parent 06bcb3d6eb
commit 5df8f688d1
8 changed files with 322 additions and 0 deletions

View File

@ -12,3 +12,10 @@ func TestDotPathToStandardPath(t *testing.T) {
asserts.Equal("/目录", DotPathToStandardPath("目录"))
asserts.Equal("/目录/目录2", DotPathToStandardPath("目录,目录2"))
}
func TestFillSlash(t *testing.T) {
asserts := assert.New(t)
asserts.Equal("/", FillSlash("/"))
asserts.Equal("/", FillSlash(""))
asserts.Equal("/123/", FillSlash("/123"))
}