press empty to release and defer close

This commit is contained in:
bel
2023-03-01 21:11:26 -07:00
parent 4c233cf794
commit ecbce05cf3
2 changed files with 12 additions and 4 deletions

View File

@@ -10,7 +10,7 @@ import (
func TestKeyboardIntegration(t *testing.T) {
kb := output.NewKeyboard()
defer kb.Release()
t.Cleanup(kb.Close)
t.Log("pressing 'a' for 5 seconds")
kb.Press(output.A)
@@ -19,5 +19,5 @@ func TestKeyboardIntegration(t *testing.T) {
time.Sleep(time.Second)
}
t.Logf("releasing")
kb.Release()
kb.Press()
}