Safe Haskell | None |
---|
- type SandboxStateRef = IORef SandboxState
- newtype Sandbox a = Sandbox {
- runSandbox :: ErrorT String (ReaderT SandboxStateRef IO) a
- data SandboxState = SandboxState {
- ssName :: String
- ssDataDir :: FilePath
- ssProcesses :: Map String SandboxedProcess
- ssProcessOrder :: [String]
- ssAllocatedPorts :: Map String PortNumber
- ssAvailablePorts :: [PortNumber]
- ssFiles :: Map String FilePath
- ssVariables :: Map String ByteString
- data SandboxedProcess = SandboxedProcess {}
- data Capture
- data SandboxedProcessInstance
- get :: Sandbox SandboxState
- put :: SandboxState -> Sandbox SandboxState
- pretty :: SandboxState -> String
- header :: SandboxState -> String
- footer :: String
- newSandboxState :: String -> FilePath -> IO SandboxStateRef
- registerProcess :: String -> FilePath -> [String] -> Maybe Int -> Maybe Capture -> Sandbox SandboxedProcess
- isValidProcessName :: String -> Bool
- getProcess :: String -> Sandbox SandboxedProcess
- updateProcess :: SandboxedProcess -> Sandbox SandboxedProcess
- secondInµs :: Int
- setFile' :: String -> String -> SandboxState -> IO (FilePath, SandboxState)
- bufferSize :: Int
- hReadWithTimeout :: Handle -> Int -> Sandbox ByteString
- sendToPort :: String -> String -> Int -> Sandbox String
- getNewPort :: String -> Sandbox PortNumber
- isBindable :: PortNumber -> IO Bool
- startProcess :: SandboxedProcess -> Sandbox SandboxedProcess
- formatCommandLine :: String -> [String] -> String
- stopProcess :: SandboxedProcess -> Sandbox SandboxedProcess
- hSignalProcess :: Signal -> ProcessHandle -> IO ()
- killProcess :: ProcessHandle -> IO ()
- hGetProcessID :: ProcessHandle -> IO ProcessID
- interactWithProcess :: SandboxedProcess -> String -> Int -> Sandbox String
- getProcessInputHandle :: SandboxedProcess -> Sandbox Handle
- getProcessCapturedOutputHandle :: SandboxedProcess -> Sandbox Handle
- getProcessBinary :: SandboxedProcess -> Sandbox FilePath
- findExecutables :: [FilePath] -> IO [FilePath]
- tryBinary :: FilePath -> IO (Maybe FilePath)
- getProcessCandidateBinaries :: SandboxedProcess -> [FilePath]
- expand :: String -> IO String
- whenM :: Monad m => m Bool -> m () -> m ()
- setVariable :: Serialize a => String -> a -> Sandbox a
- checkVariable :: String -> Sandbox Bool
- getVariable :: Serialize a => String -> a -> Sandbox a
- unsetVariable :: String -> Sandbox ()
- isVerbose :: Sandbox Bool
- verbosityKey :: String
- displayBanner :: Sandbox ()
- installSignalHandlers :: Sandbox ()
- data SandboxSeed
- data SandboxTestOptions = SandboxTestOptions {}
- putOptions :: SandboxTestOptions -> Sandbox ()
- getOptions :: Sandbox (Maybe SandboxTestOptions)
- optionsVariable :: String
Documentation
Sandbox | |
|
data SandboxState Source
SandboxState | |
|
MonadReader (IORef SandboxState) Sandbox |
data SandboxedProcess Source
pretty :: SandboxState -> StringSource
header :: SandboxState -> StringSource
newSandboxState :: String -> FilePath -> IO SandboxStateRefSource
registerProcess :: String -> FilePath -> [String] -> Maybe Int -> Maybe Capture -> Sandbox SandboxedProcessSource
setFile' :: String -> String -> SandboxState -> IO (FilePath, SandboxState)Source
hReadWithTimeout :: Handle -> Int -> Sandbox ByteStringSource
getNewPort :: String -> Sandbox PortNumberSource
isBindable :: PortNumber -> IO BoolSource
formatCommandLine :: String -> [String] -> StringSource
hSignalProcess :: Signal -> ProcessHandle -> IO ()Source
killProcess :: ProcessHandle -> IO ()Source
interactWithProcess :: SandboxedProcess -> String -> Int -> Sandbox StringSource
findExecutables :: [FilePath] -> IO [FilePath]Source
Sets a custom variable in the sandbox monad.
Checks that a custom sandbox variable is set.
Returns the value of a previously set sandbox variable (or a provided default value if unset)
displayBanner :: Sandbox ()Source
data SandboxSeed Source
putOptions :: SandboxTestOptions -> Sandbox ()Source