summaryrefslogtreecommitdiff
path: root/src/Run.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2025-08-30 22:09:14 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2025-09-01 20:44:22 +0200
commit27bf4a78b7203ed77790c92134213c3398214daa (patch)
tree5e17a92e4d4704ede7823595f42fb45ef686afbf /src/Run.hs
parentfc40dfc41e8b3fbbe830846499ccce122930b235 (diff)
Add "ignore" commandHEADmaster
Changelog: Added `ignore` builtin command
Diffstat (limited to 'src/Run.hs')
-rw-r--r--src/Run.hs9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/Run.hs b/src/Run.hs
index b38bedd..a09947b 100644
--- a/src/Run.hs
+++ b/src/Run.hs
@@ -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