(t *testing.T)
| 236 | } |
| 237 | |
| 238 | func TestHandleHook_ComposeAnsiNeverDisablesOsc8(t *testing.T) { |
| 239 | t.Setenv("COMPOSE_ANSI", "never") |
| 240 | data := marshalHookData(t, hooks.Request{ |
| 241 | RootCmd: "compose logs", |
| 242 | }) |
| 243 | var buf bytes.Buffer |
| 244 | err := handleHook(t.Context(), []string{data}, &buf) |
| 245 | assert.NilError(t, err) |
| 246 | |
| 247 | msg := unmarshalResponse(t, buf.Bytes()) |
| 248 | assert.Assert(t, strings.Contains(msg.Template, testDeepLink), "hint should contain the deep link URL") |
| 249 | assert.Assert(t, !strings.Contains(msg.Template, "\033"), "hint should not contain ANSI escape sequences") |
| 250 | } |
| 251 | |
| 252 | func TestResolveAppID_ShortCircuitsOnFlag(t *testing.T) { |
| 253 | tests := []struct { |
nothing calls this directly
no test coverage detected