summaryrefslogtreecommitdiff
path: root/src/Run.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2024-09-21 21:19:37 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2024-09-24 20:02:36 +0200
commit274554243235d3013430a48973fd0f25244ac392 (patch)
tree122353115dc3205ba41b1133e0dd20c82c2d3118 /src/Run.hs
parent0a51c798d1322297f13ce6bc7a500ce5212b5e8e (diff)
Function parameters and calls
Diffstat (limited to 'src/Run.hs')
-rw-r--r--src/Run.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Run.hs b/src/Run.hs
index 2bee6ec..24bba48 100644
--- a/src/Run.hs
+++ b/src/Run.hs
@@ -188,7 +188,7 @@ evalSteps = mapM_ $ \case
withVar :: ExprType e => VarName -> e -> TestRun a -> TestRun a
-withVar name value = local (fmap $ \s -> s { tsVars = (name, SomeVarValue value) : tsVars s })
+withVar name value = local (fmap $ \s -> s { tsVars = ( name, SomeVarValue mempty $ const value ) : tsVars s })
withInternet :: (Network -> TestRun a) -> TestRun a
withInternet inner = do
@@ -310,7 +310,7 @@ expect (SourceLine sline) p expr tvars inner = do
throwError Failed
outProc OutputMatch p line
- local (fmap $ \s -> s { tsVars = zip vars (map SomeVarValue capture) ++ tsVars s }) inner
+ local (fmap $ \s -> s { tsVars = zip vars (map (SomeVarValue mempty . const) capture) ++ tsVars s }) inner
Nothing -> exprFailed (T.pack "expect") (SourceLine sline) (Just $ procName p) expr