- data ExpectM a = ExpectM (Maybe ExpectProc -> IO (a, Maybe ExpectProc))
- data ExpectOption a
- spawn :: String -> ExpectM ()
- send :: String -> ExpectM ()
- switch :: [ExpectOption a] -> a -> ExpectM a
- wait :: ExpectType -> String -> ExpectM ()
- check :: ExpectType -> String -> ExpectM a -> ExpectOption a
- readStr :: Int -> ExpectM String
- mute :: ExpectM ()
- unmute :: ExpectM ()
- runExpect :: ExpectM a -> IO a
- runExpectIO :: ExpectM (IO a) -> IO a
Spawns the child process specified, and is used for all following actions.
Take a list of cases and run the action of the case that matches, or return a fail value in the case of no matches.
Wait for a pattern to match.
How to interpret the pattern
|-> ExpectM a|
action to take in case that the case matches
|-> ExpectOption a|
Construct an option for use with switch
Read N characters from the terminal. Note that this includes characters echoed from send actions.