(t *testing.T)
| 24 | ) |
| 25 | |
| 26 | func 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 | |
| 37 | func Test_guessGistName_stdin(t *testing.T) { |
| 38 | files := map[string]*shared.GistFile{ |
nothing calls this directly
no test coverage detected