confirmed keypress works on mac and mario runs right
parent
5f59054366
commit
7202fef15d
|
|
@ -13,12 +13,14 @@ func TestKeyboardIntegration(t *testing.T) {
|
||||||
kb := output.NewKeyboard()
|
kb := output.NewKeyboard()
|
||||||
t.Cleanup(kb.Close)
|
t.Cleanup(kb.Close)
|
||||||
|
|
||||||
t.Log("pressing 'a' for 5 seconds")
|
t.Run("hold d", func(t *testing.T) {
|
||||||
kb.Press(key.A)
|
t.Log("pressing 'd' for 5 seconds")
|
||||||
|
kb.Press(key.D)
|
||||||
for i := 0; i < 5; i++ {
|
for i := 0; i < 5; i++ {
|
||||||
t.Logf("\t%d...", 5-i)
|
t.Logf("\t%d...", 5-i)
|
||||||
time.Sleep(time.Second)
|
time.Sleep(time.Second)
|
||||||
}
|
}
|
||||||
t.Logf("releasing")
|
t.Logf("releasing")
|
||||||
kb.Press()
|
kb.Press()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue