diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2025-02-09 21:59:12 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2025-02-11 20:49:15 +0100 |
commit | d67825ea3f441523e2814b831d397d95c0dc46a4 (patch) | |
tree | 0224df35bdfa6acaca2587b86e3921bf60ffccf4 /src/Run.hs | |
parent | 7cebff0d30b628e4a7d32feff83a767c126e32e7 (diff) |
Diffstat (limited to 'src/Run.hs')
-rw-r--r-- | src/Run.hs | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -33,7 +33,7 @@ import Run.Monad import Test import Test.Builtins -runTest :: Output -> TestOptions -> Test -> [ ( VarName, SomeExpr ) ] -> IO Bool +runTest :: Output -> TestOptions -> Test -> [ ( FqVarName, SomeExpr ) ] -> IO Bool runTest out opts test variables = do let testDir = optTestDir opts when (optForce opts) $ removeDirectoryRecursive testDir `catchIOError` \e -> @@ -249,7 +249,7 @@ exprFailed desc sline pname exprVars = do outLine OutputMatchFail (Just prompt) $ T.concat [desc, T.pack " failed on ", textSourceLine sline] forM_ exprVars $ \((name, sel), value) -> outLine OutputMatchFail (Just prompt) $ T.concat - [ " ", textVarName name, T.concat (map ("."<>) sel) + [ " ", textFqVarName name, T.concat (map ("."<>) sel) , " = ", textSomeVarValue sline value ] throwError Failed @@ -273,12 +273,6 @@ expect sline p (Traced trace re) tvars inner = do outProc OutputMatchFail p $ T.pack "mismatched number of capture variables on " `T.append` textSourceLine sline throwError Failed - forM_ vars $ \name -> do - cur <- asks (lookup name . tsVars . snd) - when (isJust cur) $ do - outProc OutputError p $ T.pack "variable '" `T.append` textVarName name `T.append` T.pack "' already exists on " `T.append` textSourceLine sline - throwError Failed - outProc OutputMatch p line inner capture |