(t *testing.T)
| 1813 | } |
| 1814 | |
| 1815 | func TestWithStdout_SetsSpecifiedWriterAsStdout(t *testing.T) { |
| 1816 | t.Parallel() |
| 1817 | buf := new(bytes.Buffer) |
| 1818 | want := "Hello, world." |
| 1819 | _, err := script.Echo(want).WithStdout(buf).Stdout() |
| 1820 | if err != nil { |
| 1821 | t.Fatal(err) |
| 1822 | } |
| 1823 | got := buf.String() |
| 1824 | if got != want { |
| 1825 | t.Errorf("want %q, got %q", want, got) |
| 1826 | } |
| 1827 | } |
| 1828 | |
| 1829 | func TestWithEnv_UnsetsAllEnvVarsGivenEmptySlice(t *testing.T) { |
| 1830 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…