(t *testing.T)
| 293 | } |
| 294 | |
| 295 | func TestEchoProducesSuppliedString(t *testing.T) { |
| 296 | t.Parallel() |
| 297 | want := "Hello, world." |
| 298 | p := script.Echo(want) |
| 299 | got, err := p.String() |
| 300 | if err != nil { |
| 301 | t.Fatal(err) |
| 302 | } |
| 303 | if got != want { |
| 304 | t.Errorf("want %q, got %q", want, got) |
| 305 | } |
| 306 | } |
| 307 | |
| 308 | func TestEchoReplacesInputWithSuppliedStringWhenUsedAsFilter(t *testing.T) { |
| 309 | t.Parallel() |