diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2023-05-07 10:33:36 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2023-07-13 17:37:09 +0200 |
commit | 92c763ad490accaec833ccf7a4775a5a3d4d078a (patch) | |
tree | c3640fcdd56a8432c20b82200d808f343ac5cf28 /src/Run.hs | |
parent | c07f047bc90b6052b7d61de8efcbd7cb9d763e46 (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.hs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 () |