From 74e96f088208179dae9def6e744f68aacbca7558 Mon Sep 17 00:00:00 2001 From: Andrea Bedini Date: Tue, 5 Dec 2023 11:45:54 +0800 Subject: [PATCH] Avoid extra temporary file --- .../NewUpdate/RejectFutureIndexStates/cabal.test.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cabal-testsuite/PackageTests/NewUpdate/RejectFutureIndexStates/cabal.test.hs b/cabal-testsuite/PackageTests/NewUpdate/RejectFutureIndexStates/cabal.test.hs index ca26a482d16..eb80e0b50ee 100644 --- a/cabal-testsuite/PackageTests/NewUpdate/RejectFutureIndexStates/cabal.test.hs +++ b/cabal-testsuite/PackageTests/NewUpdate/RejectFutureIndexStates/cabal.test.hs @@ -10,8 +10,7 @@ main = cabalTest $ withProjectFile "cabal.project" $ withRemoteRepo "repo" $ do . resultOutput <$> recordMode DoNotRecord (cabal' "update" []) -- update golden output with actual timestamp - shell "cp" ["cabal.out.in", "cabal.out"] - shell "sed" ["-i''", "-e", "s/REPLACEME/" <> output <> "/g", "cabal.out"] + shell "sed" ["-e", "s/REPLACEME/" <> output <> "/g; w cabal.out", "cabal.out.in"] -- This shall fail with an error message as specified in `cabal.out` fails $ cabal "build" ["--index-state=4000-01-01T00:00:00Z", "fake-pkg"] -- This shall fail by not finding the package, what indicates that it