diff options
| author | Roman Smrž <roman.smrz@seznam.cz> | 2026-05-23 12:37:36 +0200 |
|---|---|---|
| committer | Roman Smrž <roman.smrz@seznam.cz> | 2026-05-23 12:37:36 +0200 |
| commit | 858403fc3ea0888ea748cb23b04fcefe1d21c117 (patch) | |
| tree | c95361c9945d7bcaf6ff366933ebc86147dac1d4 /src/Main.hs | |
| parent | b3bf16872222058395c6224e862c1e12f7d829dc (diff) | |
Diffstat (limited to 'src/Main.hs')
| -rw-r--r-- | src/Main.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Main.hs b/src/Main.hs index a77e8cc..9969109 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -194,11 +194,11 @@ main = do | otherwise = OutputStyleQuiet out <- startOutput outputStyle useColor - ( modules, tags, globalDefs ) <- loadModules (map fst files) + LoadedModules {..} <- loadModules (map fst files) - let excludedTests = optExclude opts ++ map (snd . fst) (filter (\( ( _, _ ), ts ) -> any (\(Tag _ t) -> textVarName t `elem` optExclude opts) ts) tags) + let excludedTests = optExclude opts ++ map (snd . fst) (filter (\( ( _, _ ), ts ) -> any (\(Tag _ t) -> textVarName t `elem` optExclude opts) ts) lmTags) tests <- filter ((`notElem` excludedTests) . testName) <$> if null otests - then fmap concat $ forM (zip modules files) $ \( Module {..}, ( filePath, mbTestName )) -> do + then fmap concat $ forM (zip lmModules files) $ \( Module {..}, ( filePath, mbTestName )) -> do case mbTestName of Nothing -> return moduleTests Just name @@ -209,7 +209,7 @@ main = do hPutStrLn stderr $ "Test ‘" <> T.unpack name <> "’ not found in ‘" <> filePath <> "’" exitFailure else forM otests $ \name -> if - | Just test <- find ((name ==) . testName) $ concatMap moduleTests modules + | Just test <- find ((name ==) . testName) $ concatMap moduleTests lmModules -> return test | otherwise -> do @@ -224,7 +224,7 @@ main = do let topts = (optTest opts) { optTcpdump = tcpdump } - ok <- allM (runTest out topts globalDefs) $ + ok <- allM (runTest out topts lmGlobalDefs) $ concat $ replicate (optRepeat opts) tests when (not ok) exitFailure |