MCPcopy
hub / github.com/cli/cli / Test_processFiles

Function Test_processFiles

pkg/cmd/gist/create/create_test.go:26–35  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

24)
25
26func Test_processFiles(t *testing.T) {
27 fakeStdin := strings.NewReader("hey cool how is it going")
28 files, err := processFiles(io.NopCloser(fakeStdin), "", []string{"-"})
29 if err != nil {
30 t.Fatalf("unexpected error processing files: %s", err)
31 }
32
33 assert.Equal(t, 1, len(files))
34 assert.Equal(t, "hey cool how is it going", files["gistfile0.txt"].Content)
35}
36
37func Test_guessGistName_stdin(t *testing.T) {
38 files := map[string]*shared.GistFile{

Callers

nothing calls this directly

Calls 2

processFilesFunction · 0.85
EqualMethod · 0.80

Tested by

no test coverage detected