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

Function testRelError

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

Source from the content-addressed store, hash-verified

190}
191
192func 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
203func TestComponents(t *testing.T) {
204 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…