MCPcopy
hub / github.com/cli/cli / TestParseAbsolutePath

Function TestParseAbsolutePath

internal/safepaths/absolute_test.go:14–21  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func TestParseAbsolutePath(t *testing.T) {
15 t.Parallel()
16
17 absolutePath, err := safepaths.ParseAbsolute("/base")
18 require.NoError(t, err)
19
20 require.Equal(t, filepath.Join(rootDir(), "base"), absolutePath.String())
21}
22
23func TestAbsoluteEmptyPathStringPanic(t *testing.T) {
24 t.Parallel()

Callers

nothing calls this directly

Calls 5

ParseAbsoluteFunction · 0.92
rootDirFunction · 0.85
EqualMethod · 0.80
JoinMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected