Go bindings for libghostty-vt.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 29 lines 564 B view raw
1package libghostty 2 3import ( 4 "testing" 5) 6 7func TestFocusEncodeGained(t *testing.T) { 8 out, err := FocusEncode(FocusGained) 9 if err != nil { 10 t.Fatal(err) 11 } 12 // Focus gained: CSI I = \x1b[I 13 expected := "\x1b[I" 14 if string(out) != expected { 15 t.Fatalf("expected %q, got %q", expected, string(out)) 16 } 17} 18 19func TestFocusEncodeLost(t *testing.T) { 20 out, err := FocusEncode(FocusLost) 21 if err != nil { 22 t.Fatal(err) 23 } 24 // Focus lost: CSI O = \x1b[O 25 expected := "\x1b[O" 26 if string(out) != expected { 27 t.Fatalf("expected %q, got %q", expected, string(out)) 28 } 29}