diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-12-21 22:18:50 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2024-12-21 22:25:42 +0530 |
| commit | f51fbc728e4b731372e39ba19c38a35ef58fe71a (patch) | |
| tree | ada2dbc2a16b6df46d446cfd9fc787d4c5a18879 /specs/Specs/AppEventSpec.hs | |
| parent | 1ade68e7252dda79c365cc9ec187c2bea3513cae (diff) | |
| download | chelleport-f51fbc728e4b731372e39ba19c38a35ef58fe71a.tar.gz chelleport-f51fbc728e4b731372e39ba19c38a35ef58fe71a.zip | |
Add action repetition
Diffstat (limited to 'specs/Specs/AppEventSpec.hs')
| -rw-r--r-- | specs/Specs/AppEventSpec.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/specs/Specs/AppEventSpec.hs b/specs/Specs/AppEventSpec.hs index 390fbc2..db292a7 100644 --- a/specs/Specs/AppEventSpec.hs +++ b/specs/Specs/AppEventSpec.hs @@ -86,7 +86,6 @@ test = do it "calls key input handler" $ do eventHandler (mkKeyboardEvent SDL.KeycodeA SDL.Pressed defaultMod) `shouldBe` Just (HandleKeyInput SDL.KeycodeA) eventHandler (mkKeyboardEvent SDL.KeycodeQ SDL.Pressed defaultMod) `shouldBe` Just (HandleKeyInput SDL.KeycodeQ) - eventHandler (mkKeyboardEvent SDL.Keycode9 SDL.Pressed defaultMod) `shouldBe` Just (HandleKeyInput SDL.Keycode9) context "when shift key is pressed" $ do it "enables shift" $ do @@ -97,3 +96,8 @@ test = do it "disabled shift" $ do let action = eventHandler $ mkKeyboardEvent SDL.KeycodeRShift SDL.Released defaultMod action `shouldBe` Just (UpdateShiftState False) + + context "when digit is pressed" $ do + it "sets repetition count" $ do + let action = eventHandler $ mkKeyboardEvent SDL.Keycode9 SDL.Pressed defaultMod + action `shouldBe` Just (UpdateRepetition 9) |
