diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2024-09-28 20:38:48 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2024-09-28 20:38:48 +0200 |
commit | 9a84b3cd39bbed74353dcf8156bce2218c049317 (patch) | |
tree | 481e3408e145cc1ec8e842172abb29a1ad5596dd /src/Run.hs | |
parent | 9b947899eea2852e9855fa30595e7a3176b70875 (diff) |
Fix regex check in flush command
Changelog: Fix regex check in flush command
Diffstat (limited to 'src/Run.hs')
-rw-r--r-- | src/Run.hs | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -10,7 +10,6 @@ import Control.Monad import Control.Monad.Except import Control.Monad.Reader -import Data.Either import Data.Map qualified as M import Data.Maybe import Data.Set qualified as S @@ -323,7 +322,7 @@ flush p mbexpr = do atomicallyTest $ do writeTVar (procOutput p) =<< case mbre of Nothing -> return [] - Just re -> filter (isLeft . regexMatch re) <$> readTVar (procOutput p) + Just re -> filter (either error isNothing . regexMatch re) <$> readTVar (procOutput p) testStepGuard :: SourceLine -> Expr Bool -> TestRun () testStepGuard sline expr = do |