diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-12-14 15:13:40 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2024-12-14 15:17:46 +0530 |
| commit | ef178e85975ea2bdbd2043c92f0917e0fe19823a (patch) | |
| tree | 8d5c6c991fd28cadbdeb905f3d3633ebb30bca83 /specs | |
| parent | fa02e5c7404dfe6aa47a1f5b5052e915e6d413d6 (diff) | |
| download | chelleport-ef178e85975ea2bdbd2043c92f0917e0fe19823a.tar.gz chelleport-ef178e85975ea2bdbd2043c92f0917e0fe19823a.zip | |
Draw grid + open x11 display to trigger click event
Diffstat (limited to 'specs')
| -rw-r--r-- | specs/Specs/KeySequenceSpec.hs | 13 |
1 files changed, 7 insertions, 6 deletions
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 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 exact match is present" $ do + context "when there is an exact match" $ do it "returns next characters" $ do nextChars "ABD" [["XYZ", "ABC"], ["AMK", "BBL", "ABD"]] `shouldBe` Just "" |
