(t *testing.T)
| 188 | } |
| 189 | |
| 190 | func TestCommandEnvDoesNotEval(t *testing.T) { |
| 191 | ctx := context.Background() |
| 192 | stdout, _, err := NewBuilder(ctx, "echo", "-n", "$foo"). |
| 193 | WithEnv(Env{"foo": "bar"}). |
| 194 | Prepare(). |
| 195 | RunAndGetOutput() |
| 196 | |
| 197 | assert.NoError(t, err) |
| 198 | // Not expanded |
| 199 | assert.Equal(t, []byte("$foo"), stdout) |
| 200 | } |
| 201 | |
| 202 | func TestCommandContextCancels(t *testing.T) { |
| 203 | ctx, cancel := context.WithCancel(context.Background()) |
nothing calls this directly
no test coverage detected