(t *testing.T)
| 7 | } |
| 8 | |
| 9 | func TestFixAndCleanPath(t *testing.T) { |
| 10 | datas := map[string]string{ |
| 11 | "": "/", |
| 12 | ".././": "/", |
| 13 | "../../.../": "/...", |
| 14 | "x//\\y/": "/x/y", |
| 15 | ".././.x/.y/.//..x../..y..": "/.x/.y/..x../..y..", |
| 16 | } |
| 17 | for key, value := range datas { |
| 18 | if FixAndCleanPath(key) != value { |
| 19 | t.Logf("raw %s fix fail", key) |
| 20 | } |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | func TestValidateNameComponent(t *testing.T) { |
| 25 | validNames := []string{ |
nothing calls this directly
no test coverage detected