MCPcopy
hub / github.com/urfave/cli / expectFileContent

Function expectFileContent

cli_test.go:14–22  ·  cli_test.go::expectFileContent
(t *testing.T, file, got string)

Source from the content-addressed store, hash-verified

12)
13
14func expectFileContent(t *testing.T, file, got string) {
15 data, err := os.ReadFile(file)
16 // Ignore windows line endings
17 data = bytes.ReplaceAll(data, []byte("\r\n"), []byte("\n"))
18
19 r := require.New(t)
20 r.NoError(err)
21 r.Equal(got, string(data))
22}
23
24func buildTestContext(t *testing.T) context.Context {
25 ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond)

Callers 1

TestFishCompletionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected