(t *testing.T, expected string, basepath string, targpath string)
| 190 | } |
| 191 | |
| 192 | func testRelError(t *testing.T, expected string, basepath string, targpath string) { |
| 193 | if os.PathSeparator == '/' { |
| 194 | rel, err := filepath.Rel(basepath, targpath) |
| 195 | assert.Error(t, err) |
| 196 | assert.Equal(t, expected, rel) |
| 197 | } |
| 198 | rel, err := Rel(basepath, targpath) |
| 199 | assert.Error(t, err) |
| 200 | assert.Equal(t, expected, rel) |
| 201 | } |
| 202 | |
| 203 | func TestComponents(t *testing.T) { |
| 204 | t.Parallel() |