diff options
author | Aspen Smith <grfn@gws.fyi> | 2024-02-12T03·00-0500 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-02-14T19·37+0000 |
commit | 82ecd61f5c699cf3af6c4eadf47a1c52b1d696c6 (patch) | |
tree | 429c5e078528000591742ec3211bc768ae913a78 /users/grfn/xanthous/test/Xanthous/CommandSpec.hs | |
parent | 0ba476a4266015f278f18d74094299de74a5a111 (diff) |
chore(users): grfn -> aspen r/7511
Change-Id: I6c6847fac56f0a9a1a2209792e00a3aec5e672b9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10809 Autosubmit: aspen <root@gws.fyi> Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Reviewed-by: lukegb <lukegb@tvl.fyi>
Diffstat (limited to 'users/grfn/xanthous/test/Xanthous/CommandSpec.hs')
-rw-r--r-- | users/grfn/xanthous/test/Xanthous/CommandSpec.hs | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/users/grfn/xanthous/test/Xanthous/CommandSpec.hs b/users/grfn/xanthous/test/Xanthous/CommandSpec.hs deleted file mode 100644 index 13f69a808d02..000000000000 --- a/users/grfn/xanthous/test/Xanthous/CommandSpec.hs +++ /dev/null @@ -1,40 +0,0 @@ --------------------------------------------------------------------------------- -module Xanthous.CommandSpec (main, test) where --------------------------------------------------------------------------------- -import Test.Prelude --------------------------------------------------------------------------------- -import Xanthous.Command --------------------------------------------------------------------------------- -import Data.Aeson (fromJSON, Value(String)) -import qualified Data.Aeson as A -import Graphics.Vty.Input (Key(..), Modifier(..)) --------------------------------------------------------------------------------- - -main :: IO () -main = defaultMain test - -test :: TestTree -test = testGroup "Xanthous.CommandSpec" - [ testGroup "keybindings" - [ testCase "all are valid" $ keybindings `deepseq` pure () - , testProperty "all non-move commands are bound" $ \cmd -> - let isn'tMove = case cmd of - Move _ -> False - StartAutoMove _ -> False - _ -> True - in isn'tMove ==> member cmd commands - ] - , testGroup "instance FromJSON Keybinding" $ - [ ("q", Keybinding (KChar 'q') []) - , ("<up>", Keybinding KUp []) - , ("<left>", Keybinding KLeft []) - , ("<right>", Keybinding KRight []) - , ("<down>", Keybinding KDown []) - , ("S-q", Keybinding (KChar 'q') [MShift]) - , ("C-S-q", Keybinding (KChar 'q') [MCtrl, MShift]) - , ("m-<UP>", Keybinding KUp [MMeta]) - , ("S", Keybinding (KChar 'S') []) - ] <&> \(s, kb) -> - testCase (fromString $ unpack s <> " -> " <> show kb) - $ fromJSON (String s) @?= A.Success kb - ] |