confirmed keypress works on mac and mario runs right
This commit is contained in:
@@ -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")
|
||||||
for i := 0; i < 5; i++ {
|
kb.Press(key.D)
|
||||||
t.Logf("\t%d...", 5-i)
|
for i := 0; i < 5; i++ {
|
||||||
time.Sleep(time.Second)
|
t.Logf("\t%d...", 5-i)
|
||||||
}
|
time.Sleep(time.Second)
|
||||||
t.Logf("releasing")
|
}
|
||||||
kb.Press()
|
t.Logf("releasing")
|
||||||
|
kb.Press()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user