(t *testing.T)
| 129 | } |
| 130 | |
| 131 | func TestStreamWriterCRLF(t *testing.T) { |
| 132 | var lines []string |
| 133 | sw := NewStreamWriter(func(line string) { |
| 134 | lines = append(lines, line) |
| 135 | }) |
| 136 | |
| 137 | if _, err := sw.Write([]byte("hello\r\nworld\r\n")); err != nil { |
| 138 | t.Fatal(err) |
| 139 | } |
| 140 | if len(lines) != 2 || lines[0] != "hello" || lines[1] != "world" { |
| 141 | t.Errorf("expected [hello, world], got %v", lines) |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | func TestEngineExecuteUnknown(t *testing.T) { |
| 146 | var buf bytes.Buffer |
nothing calls this directly
no test coverage detected