From a4144c0c6e0d3df3740c70b9ad947642d9d48ac6 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 5 Oct 2025 12:32:24 +0530 Subject: Show keyseq,selections in statusline + minor refactor --- specs/Specs/FooSpec.hs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'specs/Specs') 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 "g" `shouldBe` Just [K.KChar '\t', K.KChar 'g', K.KEnter] - parseKey "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 "g" `shouldBe` Just [K.KChar '\t', K.KChar 'g', K.KEnter] + parseKeySequence "22" `shouldBe` Just [K.KEsc, K.KChar '2', K.KChar '2'] -- cgit v1.3.1