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()
|
||||
t.Cleanup(kb.Close)
|
||||
|
||||
t.Log("pressing 'a' for 5 seconds")
|
||||
kb.Press(key.A)
|
||||
for i := 0; i < 5; i++ {
|
||||
t.Logf("\t%d...", 5-i)
|
||||
time.Sleep(time.Second)
|
||||
}
|
||||
t.Logf("releasing")
|
||||
kb.Press()
|
||||
t.Run("hold d", func(t *testing.T) {
|
||||
t.Log("pressing 'd' for 5 seconds")
|
||||
kb.Press(key.D)
|
||||
for i := 0; i < 5; i++ {
|
||||
t.Logf("\t%d...", 5-i)
|
||||
time.Sleep(time.Second)
|
||||
}
|
||||
t.Logf("releasing")
|
||||
kb.Press()
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue