()
| 102 | } |
| 103 | |
| 104 | func genLongPaths() (testPaths []cleanPathTest) { |
| 105 | for i := 1; i <= 1234; i++ { |
| 106 | ss := strings.Repeat("a", i) |
| 107 | |
| 108 | correctPath := "/" + ss |
| 109 | testPaths = append(testPaths, cleanPathTest{ |
| 110 | path: correctPath, |
| 111 | result: correctPath, |
| 112 | }, cleanPathTest{ |
| 113 | path: ss, |
| 114 | result: correctPath, |
| 115 | }, cleanPathTest{ |
| 116 | path: "//" + ss, |
| 117 | result: correctPath, |
| 118 | }, cleanPathTest{ |
| 119 | path: "/" + ss + "/b/..", |
| 120 | result: correctPath, |
| 121 | }) |
| 122 | } |
| 123 | return |
| 124 | } |
| 125 | |
| 126 | func TestPathCleanLong(t *testing.T) { |
| 127 | cleanTests := genLongPaths() |
no outgoing calls
no test coverage detected