From 5539c23836b996ce5a0d2e04b50e9a7605f915fc Mon Sep 17 00:00:00 2001 From: Phil de Joux Date: Fri, 3 Jan 2025 06:24:18 -0500 Subject: [PATCH] Substitute encodeLf for concatOutput - For assertOutputMatches --- cabal-testsuite/src/Test/Cabal/Prelude.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cabal-testsuite/src/Test/Cabal/Prelude.hs b/cabal-testsuite/src/Test/Cabal/Prelude.hs index 4c5605e002c..daa5472c9d0 100644 --- a/cabal-testsuite/src/Test/Cabal/Prelude.hs +++ b/cabal-testsuite/src/Test/Cabal/Prelude.hs @@ -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