You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
226 B
Go

package main
import (
"bytes"
"testing"
)
func TestRun(t *testing.T) {
buffer := bytes.Buffer{}
Run(&buffer)
got := buffer.String()
want := "Hello API\n"
if got != want {
t.Errorf("got %q, want %q", got, want)
}
}