MCPcopy Create free account
hub / github.com/libgit2/git2go / TestSearchPath

Function TestSearchPath

settings_test.go:12–30  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10}
11
12func TestSearchPath(t *testing.T) {
13 paths := []pathPair{
14 pathPair{ConfigLevelSystem, "/tmp/system"},
15 pathPair{ConfigLevelGlobal, "/tmp/global"},
16 pathPair{ConfigLevelXDG, "/tmp/xdg"},
17 }
18
19 for _, pair := range paths {
20 err := SetSearchPath(pair.Level, pair.Path)
21 checkFatal(t, err)
22
23 actual, err := SearchPath(pair.Level)
24 checkFatal(t, err)
25
26 if pair.Path != actual {
27 t.Fatal("Search paths don't match")
28 }
29 }
30}
31
32func TestMmapSizes(t *testing.T) {
33 size := 42 * 1024

Callers

nothing calls this directly

Calls 3

SetSearchPathFunction · 0.85
checkFatalFunction · 0.85
SearchPathFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…