MCPcopy
hub / github.com/OpenListTeam/OpenList / TestFixAndCleanPath

Function TestFixAndCleanPath

pkg/utils/path_test.go:12–25  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10}
11
12func TestFixAndCleanPath(t *testing.T) {
13 datas := map[string]string{
14 "": "/",
15 ".././": "/",
16 "../../.../": "/...",
17 "x//\\y/": "/x/y",
18 ".././.x/.y/.//..x../..y..": "/.x/.y/..x../..y..",
19 }
20 for key, value := range datas {
21 if FixAndCleanPath(key) != value {
22 t.Logf("raw %s fix fail", key)
23 }
24 }
25}
26
27func TestGetPathHierarchy(t *testing.T) {
28 testCases := map[string][]string{

Callers

nothing calls this directly

Calls 1

FixAndCleanPathFunction · 0.85

Tested by

no test coverage detected