()
| 49 | } |
| 50 | |
| 51 | func ExampleBuilder_WithEnv() { |
| 52 | ctx := context.Background() |
| 53 | stdout, _, _ := NewBuilder(ctx, "bash", "-c", "echo -n $foo"). |
| 54 | WithEnv(Env{"foo": "bar"}). |
| 55 | Prepare(). |
| 56 | RunAndGetOutput() |
| 57 | |
| 58 | fmt.Println(string(stdout)) |
| 59 | // Output: |
| 60 | // bar |
| 61 | } |
| 62 | |
| 63 | func TestCommandRunWait(t *testing.T) { |
| 64 | ctx := context.Background() |
nothing calls this directly
no test coverage detected