From ef178e85975ea2bdbd2043c92f0917e0fe19823a Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sat, 14 Dec 2024 15:13:40 +0530 Subject: Draw grid + open x11 display to trigger click event --- specs/Specs/KeySequenceSpec.hs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'specs') diff --git a/specs/Specs/KeySequenceSpec.hs b/specs/Specs/KeySequenceSpec.hs index d094741..707646d 100644 --- a/specs/Specs/KeySequenceSpec.hs +++ b/specs/Specs/KeySequenceSpec.hs @@ -5,13 +5,14 @@ import Test.Hspec test = do describe "#nextChars" $ do - it "filters key sequence and returns next characters" $ do - nextChars "AB" [["XYZ", "ABC"], ["AMK", "BBL", "ABD"]] - `shouldBe` Just "CD" - nextChars "A" [["XYZ", "ABC"], ["AMK", "BBL", "ABD"]] - `shouldBe` Just "BM" - - context "when exact match is present" $ do + context "when there is a partial match" $ do + it "filters key sequence and returns next characters" $ do + nextChars "AB" [["XYZ", "ABC"], ["AMK", "BBL", "ABD"]] + `shouldBe` Just "CD" + nextChars "A" [["XYZ", "ABC"], ["AMK", "BBL", "ABD"]] + `shouldBe` Just "BM" + + context "when there is an exact match" $ do it "returns next characters" $ do nextChars "ABD" [["XYZ", "ABC"], ["AMK", "BBL", "ABD"]] `shouldBe` Just "" -- cgit v1.3.1