(t *testing.T, expected string, basepath string, targpath string)
| 208 | } |
| 209 | |
| 210 | func testRelError(t *testing.T, expected string, basepath string, targpath string) { |
| 211 | if os.PathSeparator == '/' { |
| 212 | rel, err := filepath.Rel(basepath, targpath) |
| 213 | assert.Error(t, err) |
| 214 | assert.Equal(t, expected, rel) |
| 215 | } |
| 216 | rel, err := Rel(basepath, targpath) |
| 217 | assert.Error(t, err) |
| 218 | assert.Equal(t, expected, rel) |
| 219 | } |
| 220 | |
| 221 | func TestComponents(t *testing.T) { |
| 222 | t.Parallel() |