keyboard push mvp
This commit is contained in:
23
src/device/output/keyboard_test.go
Normal file
23
src/device/output/keyboard_test.go
Normal file
@@ -0,0 +1,23 @@
|
||||
//go:build integration
|
||||
|
||||
package output_test
|
||||
|
||||
import (
|
||||
"mayhem-party/src/device/output"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestKeyboardIntegration(t *testing.T) {
|
||||
kb := output.NewKeyboard()
|
||||
defer kb.Release()
|
||||
|
||||
t.Log("pressing 'a' for 5 seconds")
|
||||
kb.Press(output.A)
|
||||
for i := 0; i < 5; i++ {
|
||||
t.Logf("\t%d...", 5-i)
|
||||
time.Sleep(time.Second)
|
||||
}
|
||||
t.Logf("releasing")
|
||||
kb.Release()
|
||||
}
|
||||
Reference in New Issue
Block a user