MCPcopy
hub / github.com/docker/compose / TestOSC8Link

Function TestOSC8Link

cmd/formatter/ansi_test.go:25–32  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

23)
24
25func TestOSC8Link(t *testing.T) {
26 disableAnsi = false
27 t.Cleanup(func() { disableAnsi = false })
28
29 got := OSC8Link("http://example.com", "click here")
30 want := "\x1b]8;;http://example.com\x1b\\\x1b[4mclick here\x1b[24m\x1b]8;;\x1b\\"
31 assert.Equal(t, got, want)
32}
33
34func TestOSC8Link_AnsiDisabled(t *testing.T) {
35 disableAnsi = true

Callers

nothing calls this directly

Calls 1

OSC8LinkFunction · 0.85

Tested by

no test coverage detected