24 lines
378 B
Go
24 lines
378 B
Go
//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()
|
|
}
|