Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Socket tmux tests start a tmux server, then run a regular Neovim session in a pane and connect to Neovim over a socket.
Synopsis
- type TmuxHandlerStack = SocketHandlerEffects ++ (Reader (CustomConfig ()) ': (Reader NvimSocket ': TmuxStack))
- type SocketTmuxWith r = TestEffects ++ (r ++ TmuxHandlerStack)
- type SocketTmux = SocketTmuxWith '[]
- nvimCmdline :: Path Abs File -> Text
- withSocketTmuxNvim :: Members [Test, Hedgehog IO, ChronosTime, Error Failure, Race, Embed IO] r => Members [NativeTmux, NativeCommandCodecE, Stop CodecError] r => InterpreterFor (Reader NvimSocket) r
- runSocketTmuxTestConf :: HasCallStack => TmuxTestConfig -> Sem TmuxHandlerStack () -> UnitTest
- runSocketTmuxTest :: HasCallStack => Sem TmuxHandlerStack () -> UnitTest
- runSocketTmuxGuiTest :: HasCallStack => Sem TmuxHandlerStack () -> UnitTest
- testPluginSocketTmuxConf :: forall r. HasCallStack => Members TmuxHandlerStack (r ++ TmuxHandlerStack) => TmuxTestConfig -> InterpretersFor r TmuxHandlerStack -> [RpcHandler (r ++ TmuxHandlerStack)] -> Sem (SocketTmuxWith r) () -> UnitTest
- testPluginSocketTmux :: forall r. HasCallStack => Members TmuxHandlerStack (r ++ TmuxHandlerStack) => InterpretersFor r TmuxHandlerStack -> [RpcHandler (r ++ TmuxHandlerStack)] -> Sem (SocketTmuxWith r) () -> UnitTest
- testHandlersSocketTmux :: HasCallStack => [RpcHandler TmuxHandlerStack] -> Sem SocketTmux () -> UnitTest
- testSocketTmux :: HasCallStack => Sem SocketTmux () -> UnitTest
- testPluginSocketTmuxGui :: forall r. HasCallStack => Members TmuxHandlerStack (r ++ TmuxHandlerStack) => InterpretersFor r TmuxHandlerStack -> [RpcHandler (r ++ TmuxHandlerStack)] -> Sem (SocketTmuxWith r) () -> UnitTest
- testHandlersSocketTmuxGui :: HasCallStack => [RpcHandler TmuxHandlerStack] -> Sem SocketTmux () -> UnitTest
- testSocketTmuxGui :: HasCallStack => Sem SocketTmux () -> UnitTest
Documentation
type TmuxHandlerStack = SocketHandlerEffects ++ (Reader (CustomConfig ()) ': (Reader NvimSocket ': TmuxStack)) Source #
The stack of internal effects for socket tmux tests.
type SocketTmuxWith r = TestEffects ++ (r ++ TmuxHandlerStack) Source #
The socket tmux test stack with additional effects.
type SocketTmux = SocketTmuxWith '[] Source #
The socket tmux test stack with no additional effects.
withSocketTmuxNvim :: Members [Test, Hedgehog IO, ChronosTime, Error Failure, Race, Embed IO] r => Members [NativeTmux, NativeCommandCodecE, Stop CodecError] r => InterpreterFor (Reader NvimSocket) r Source #
Create a socket for Neovim to listen on and run a Reader
with it.
runSocketTmuxTestConf :: HasCallStack => TmuxTestConfig -> Sem TmuxHandlerStack () -> UnitTest Source #
Run the tmux test stack.
runSocketTmuxTest :: HasCallStack => Sem TmuxHandlerStack () -> UnitTest Source #
Run the tmux test stack, using a pty to host tmux.
runSocketTmuxGuiTest :: HasCallStack => Sem TmuxHandlerStack () -> UnitTest Source #
Run the tmux test stack, using a terminal to tmux tmux.
testPluginSocketTmuxConf Source #
:: forall r. HasCallStack | |
=> Members TmuxHandlerStack (r ++ TmuxHandlerStack) | |
=> TmuxTestConfig | Regular test config combined with tmux config |
-> InterpretersFor r TmuxHandlerStack | Interpreter for custom effects |
-> [RpcHandler (r ++ TmuxHandlerStack)] | RPC handlers |
-> Sem (SocketTmuxWith r) () | |
-> UnitTest |
Run a plugin test against a Neovim process running in a fresh tmux session, connected over a socket.
:: forall r. HasCallStack | |
=> Members TmuxHandlerStack (r ++ TmuxHandlerStack) | |
=> InterpretersFor r TmuxHandlerStack | Interpreter for custom effects |
-> [RpcHandler (r ++ TmuxHandlerStack)] | RPC handlers |
-> Sem (SocketTmuxWith r) () | |
-> UnitTest |
Run a plugin test against a Neovim process running in a fresh tmux session, connected over a socket.
testHandlersSocketTmux Source #
:: HasCallStack | |
=> [RpcHandler TmuxHandlerStack] | RPC handlers |
-> Sem SocketTmux () | |
-> UnitTest |
Run a plugin test against a Neovim process running in a fresh tmux session, connected over a socket.
testSocketTmux :: HasCallStack => Sem SocketTmux () -> UnitTest Source #
Run a plugin test against a Neovim process running in a fresh tmux session, connected over a socket.
testPluginSocketTmuxGui Source #
:: forall r. HasCallStack | |
=> Members TmuxHandlerStack (r ++ TmuxHandlerStack) | |
=> InterpretersFor r TmuxHandlerStack | Interpreter for custom effects |
-> [RpcHandler (r ++ TmuxHandlerStack)] | RPC handlers |
-> Sem (SocketTmuxWith r) () | |
-> UnitTest |
Run a plugin test against a Neovim process running in a fresh tmux session displayed in a terminal, connected over a socket.
testHandlersSocketTmuxGui Source #
:: HasCallStack | |
=> [RpcHandler TmuxHandlerStack] | RPC handlers |
-> Sem SocketTmux () | |
-> UnitTest |
Run a plugin test against a Neovim process running in a fresh tmux session displayed in a terminal, connected over a socket.
testSocketTmuxGui :: HasCallStack => Sem SocketTmux () -> UnitTest Source #
Run a plugin test against a Neovim process running in a fresh tmux session displayed in a terminal, connected over a socket.