mirror of
https://github.com/sst/opencode.git
synced 2025-08-24 06:54:09 +00:00
27 lines
393 B
Go
27 lines
393 B
Go
package input
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestFocus(t *testing.T) {
|
|
var p Parser
|
|
_, e := p.parseSequence([]byte("\x1b[I"))
|
|
switch e.(type) {
|
|
case FocusEvent:
|
|
// ok
|
|
default:
|
|
t.Error("invalid sequence")
|
|
}
|
|
}
|
|
|
|
func TestBlur(t *testing.T) {
|
|
var p Parser
|
|
_, e := p.parseSequence([]byte("\x1b[O"))
|
|
switch e.(type) {
|
|
case BlurEvent:
|
|
// ok
|
|
default:
|
|
t.Error("invalid sequence")
|
|
}
|
|
}
|