From 9d5f89b0b7a8fcee3840f0d7bf26dc3d18db5156 Mon Sep 17 00:00:00 2001 From: Patrick Augusto Date: Fri, 4 Jun 2021 18:55:25 -0300 Subject: [PATCH] Fixing test prompt for interactive --- .../src/Distribution/Client/Init/Interactive/Command.hs | 2 +- .../tests/UnitTests/Distribution/Client/Init/Interactive.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cabal-install/src/Distribution/Client/Init/Interactive/Command.hs b/cabal-install/src/Distribution/Client/Init/Interactive/Command.hs index f4151c2775f..30f1e28c30f 100644 --- a/cabal-install/src/Distribution/Client/Init/Interactive/Command.hs +++ b/cabal-install/src/Distribution/Client/Init/Interactive/Command.hs @@ -238,7 +238,7 @@ genTestTarget => InitFlags -> InstalledPackageIndex -> m (Maybe TestTarget) -genTestTarget flags pkgs = initializeTestSuitePrompt (flags {initializeTestSuite = NoFlag}) >>= go +genTestTarget flags pkgs = initializeTestSuitePrompt flags >>= go where go initialized | not initialized = return Nothing diff --git a/cabal-install/tests/UnitTests/Distribution/Client/Init/Interactive.hs b/cabal-install/tests/UnitTests/Distribution/Client/Init/Interactive.hs index 4afc6ebe9fd..4dd2f41d7dd 100644 --- a/cabal-install/tests/UnitTests/Distribution/Client/Init/Interactive.hs +++ b/cabal-install/tests/UnitTests/Distribution/Client/Init/Interactive.hs @@ -71,7 +71,7 @@ createProjectTest pkgIx srcDb = testGroup "createProject tests" , dependencies = Flag [] } - case (_runPrompt $ createProject silent pkgIx srcDb dummyFlags') (fromList ["y", "3", "quxTest/Main.hs"]) of + case (_runPrompt $ createProject silent pkgIx srcDb dummyFlags') (fromList ["3", "quxTest/Main.hs"]) of Right (ProjectSettings opts desc (Just lib) (Just exe) (Just test), _) -> do _optOverwrite opts @?= False _optMinimal opts @?= False