MCPcopy
hub / github.com/perkeep/perkeep / TestRegularFile

Function TestRegularFile

pkg/schema/schema_test.go:55–67  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

53}
54
55func TestRegularFile(t *testing.T) {
56 fileName := "schema_test.go"
57 fi, err := os.Lstat(fileName)
58 if err != nil {
59 t.Fatalf("Unexpected error: %v", err)
60 }
61 m := NewCommonFileMap("schema_test.go", fi)
62 json, err := m.JSON()
63 if err != nil {
64 t.Fatalf("Unexpected error: %v", err)
65 }
66 t.Logf("Got json for regular file: [%s]\n", json)
67}
68
69func TestSymlink(t *testing.T) {
70 td := t.TempDir()

Callers

nothing calls this directly

Calls 5

NewCommonFileMapFunction · 0.85
LogfMethod · 0.80
LstatMethod · 0.65
FatalfMethod · 0.65
JSONMethod · 0.45

Tested by

no test coverage detected