From 27bf4a78b7203ed77790c92134213c3398214daa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 30 Aug 2025 22:09:14 +0200 Subject: Add "ignore" command Changelog: Added `ignore` builtin command --- src/Run.hs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/Run.hs') 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 -- cgit v1.2.3