Skip to content

Commit

Permalink
Substitute encodeLf for concatOutput
Browse files Browse the repository at this point in the history
- For assertOutputMatches
  • Loading branch information
philderbeast committed Jan 3, 2025
1 parent 5d3c1a0 commit 5539c23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cabal-testsuite/src/Test/Cabal/Prelude.hs
Original file line number Diff line number Diff line change
Expand Up @@ -836,14 +836,14 @@ assertOn NeedleHaystack{..} (txFwd txNeedle -> needle) (txFwd txHaystack. result
assertOutputMatches :: MonadIO m => WithCallStack (String -> Result -> m ())
assertOutputMatches regex result =
withFrozenCallStack $
unless (concatOutput output =~ regex) $
unless (encodeLf output =~ regex) $
assertFailure $ "expected regex match: " ++ regex
where output = resultOutput result

assertOutputDoesNotMatch :: MonadIO m => WithCallStack (String -> Result -> m ())
assertOutputDoesNotMatch regex result =
withFrozenCallStack $
when (concatOutput output =~ regex) $
when (encodeLf output =~ regex) $
assertFailure $ "unexpected regex match: " ++ regex
where output = resultOutput result

Expand Down

0 comments on commit 5539c23

Please sign in to comment.