MCPcopy Create free account
hub / github.com/bufbuild/buf / testRelError

Function testRelError

private/pkg/normalpath/normalpath_windows_test.go:210–219  ·  view source on GitHub ↗
(t *testing.T, expected string, basepath string, targpath string)

Source from the content-addressed store, hash-verified

208}
209
210func 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
221func TestComponents(t *testing.T) {
222 t.Parallel()

Callers 1

TestRelFunction · 0.70

Calls 2

RelFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…