diff options
Diffstat (limited to 'src/Run.hs')
-rw-r--r-- | src/Run.hs | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -206,7 +206,7 @@ runStep = \case expect line p expr captures $ runStep . inner Flush p regex -> do - flush p regex + atomicallyTest $ flushProcessOutput p regex Guard line vars expr -> do testStepGuard line vars expr @@ -348,13 +348,6 @@ expect sline p (Traced trace re) tvars inner = do Nothing -> exprFailed (T.pack "expect") sline (Just $ procName p) trace -flush :: Process -> Maybe Regex -> TestRun () -flush p mbre = do - atomicallyTest $ do - writeTVar (procOutput p) =<< case mbre of - Nothing -> return [] - Just re -> filter (either error isNothing . regexMatch re) <$> readTVar (procOutput p) - testStepGuard :: SourceLine -> EvalTrace -> Bool -> TestRun () testStepGuard sline vars x = do when (not x) $ exprFailed (T.pack "guard") sline Nothing vars |