summaryrefslogtreecommitdiff
path: root/src/Run.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2023-05-07 10:33:36 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2023-07-13 17:37:09 +0200
commit92c763ad490accaec833ccf7a4775a5a3d4d078a (patch)
treec3640fcdd56a8432c20b82200d808f343ac5cf28 /src/Run.hs
parentc07f047bc90b6052b7d61de8efcbd7cb9d763e46 (diff)
Show record selectors in failure reports
Changelog: Show record selectors in failure reports
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 01c4a03..26cc34f 100644
--- a/src/Run.hs
+++ b/src/Run.hs
@@ -266,8 +266,8 @@ exprFailed desc (SourceLine sline) pname expr = do
let prompt = maybe T.empty textProcName pname
exprVars <- gatherVars expr
outLine OutputMatchFail (Just prompt) $ T.concat [desc, T.pack " failed on ", sline]
- forM_ exprVars $ \(name, value) ->
- outLine OutputMatchFail (Just prompt) $ T.concat [T.pack " ", textVarName name, T.pack " = ", textSomeVarValue value]
+ forM_ exprVars $ \((name, sel), value) ->
+ outLine OutputMatchFail (Just prompt) $ T.concat [" ", textVarName name, T.concat (map ("."<>) sel), " = ", textSomeVarValue value]
throwError Failed
expect :: SourceLine -> Process -> Expr Regex -> [TypedVarName Text] -> TestRun () -> TestRun ()