diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-10-05 12:32:24 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-10-05 13:40:47 +0530 |
| commit | a4144c0c6e0d3df3740c70b9ad947642d9d48ac6 (patch) | |
| tree | 9fc8315aeb5d5ebf867c804d17920216c5396ab1 /specs/Specs | |
| parent | 556f890c3bb799dd6bc1e83c5dcff12f25ed5c24 (diff) | |
| download | daffm-a4144c0c6e0d3df3740c70b9ad947642d9d48ac6.tar.gz daffm-a4144c0c6e0d3df3740c70b9ad947642d9d48ac6.zip | |
Show keyseq,selections in statusline + minor refactor
Diffstat (limited to '')
| -rw-r--r-- | specs/Specs/FooSpec.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/specs/Specs/FooSpec.hs b/specs/Specs/FooSpec.hs index 3260ca9..24545f9 100644 --- a/specs/Specs/FooSpec.hs +++ b/specs/Specs/FooSpec.hs @@ -1,8 +1,7 @@ module Specs.FooSpec where import Daffm.Action.Commands (parseCommand) -import Daffm.Configuration (parseKey) -import Daffm.Event (matchKeySequence) +import Daffm.Keymap (matchKeySequence, parseKeySequence) import Daffm.Types import qualified Data.Map as Map import qualified Graphics.Vty as K @@ -80,6 +79,6 @@ test = do describe "parseKey" $ do context "when given keys" $ do it "parses correctly" $ do - parseKey "gdl" `shouldBe` Just [K.KChar 'g', K.KChar 'd', K.KChar 'l'] - parseKey "<tab>g<cr>" `shouldBe` Just [K.KChar '\t', K.KChar 'g', K.KEnter] - parseKey "<esc>22" `shouldBe` Just [K.KEsc, K.KChar '2', K.KChar '2'] + parseKeySequence "gdl" `shouldBe` Just [K.KChar 'g', K.KChar 'd', K.KChar 'l'] + parseKeySequence "<tab>g<cr>" `shouldBe` Just [K.KChar '\t', K.KChar 'g', K.KEnter] + parseKeySequence "<esc>22" `shouldBe` Just [K.KEsc, K.KChar '2', K.KChar '2'] |
