forked from haskell/cabal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request haskell#10017 from mpickering/wip/multi-fixes
Two fixes to multi repl command
- Loading branch information
Showing
11 changed files
with
130 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
cabal-testsuite/PackageTests/MultiRepl/ExtraOptions/CHANGELOG.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Revision history for extra-options | ||
|
||
## 0.1.0.0 -- YYYY-mm-dd | ||
|
||
* First version. Released on an unsuspecting world. |
30 changes: 30 additions & 0 deletions
30
cabal-testsuite/PackageTests/MultiRepl/ExtraOptions/LICENSE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Copyright (c) 2024, Matthew Pickering | ||
|
||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above | ||
copyright notice, this list of conditions and the following | ||
disclaimer in the documentation and/or other materials provided | ||
with the distribution. | ||
|
||
* Neither the name of Matthew Pickering nor the names of other | ||
contributors may be used to endorse or promote products derived | ||
from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
10 changes: 10 additions & 0 deletions
10
cabal-testsuite/PackageTests/MultiRepl/ExtraOptions/app/Main.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module Main where | ||
|
||
import qualified MyLib (someFunc) | ||
|
||
#ifdef FOO | ||
main :: IO () | ||
main = do | ||
putStrLn "Hello, Haskell!" | ||
MyLib.someFunc | ||
#endif |
13 changes: 13 additions & 0 deletions
13
cabal-testsuite/PackageTests/MultiRepl/ExtraOptions/cabal.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# cabal v2-repl | ||
Resolving dependencies... | ||
Build profile: -w ghc-<GHCVER> -O1 | ||
In order, the following will be built: | ||
- extra-options-0.1.0.0 (interactive) (lib) (first run) | ||
- extra-options-0.1.0.0 (interactive) (test:extra-options-test) (first run) | ||
- extra-options-0.1.0.0 (interactive) (exe:extra-options) (first run) | ||
Configuring library for extra-options-0.1.0.0... | ||
Preprocessing library for extra-options-0.1.0.0... | ||
Configuring test suite 'extra-options-test' for extra-options-0.1.0.0... | ||
Preprocessing test suite 'extra-options-test' for extra-options-0.1.0.0... | ||
Configuring executable 'extra-options' for extra-options-0.1.0.0... | ||
Preprocessing executable 'extra-options' for extra-options-0.1.0.0... |
6 changes: 6 additions & 0 deletions
6
cabal-testsuite/PackageTests/MultiRepl/ExtraOptions/cabal.project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
packages: . | ||
|
||
tests: True | ||
|
||
program-options | ||
ghc-options: -XCPP -DFOO |
6 changes: 6 additions & 0 deletions
6
cabal-testsuite/PackageTests/MultiRepl/ExtraOptions/cabal.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = do | ||
cabalTest $ do | ||
skipUnlessGhcVersion ">= 9.4" | ||
void $ cabalWithStdin "v2-repl" ["--enable-multi-repl","all"] "" |
39 changes: 39 additions & 0 deletions
39
cabal-testsuite/PackageTests/MultiRepl/ExtraOptions/extra-options.cabal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
cabal-version: 3.0 | ||
name: extra-options | ||
version: 0.1.0.0 | ||
license: BSD-3-Clause | ||
license-file: LICENSE | ||
author: Matthew Pickering | ||
maintainer: [email protected] | ||
build-type: Simple | ||
extra-doc-files: CHANGELOG.md | ||
|
||
common warnings | ||
ghc-options: -Wall | ||
|
||
library | ||
import: warnings | ||
exposed-modules: MyLib | ||
build-depends: base | ||
hs-source-dirs: src | ||
default-language: Haskell2010 | ||
|
||
executable extra-options | ||
import: warnings | ||
main-is: Main.hs | ||
build-depends: | ||
base, | ||
extra-options | ||
|
||
hs-source-dirs: app | ||
default-language: Haskell2010 | ||
|
||
test-suite extra-options-test | ||
import: warnings | ||
default-language: Haskell2010 | ||
type: exitcode-stdio-1.0 | ||
hs-source-dirs: test | ||
main-is: Main.hs | ||
build-depends: | ||
base, | ||
extra-options |
6 changes: 6 additions & 0 deletions
6
cabal-testsuite/PackageTests/MultiRepl/ExtraOptions/src/MyLib.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module MyLib (someFunc) where | ||
|
||
#ifdef FOO | ||
someFunc :: IO () | ||
someFunc = putStrLn "someFunc" | ||
#endif |
6 changes: 6 additions & 0 deletions
6
cabal-testsuite/PackageTests/MultiRepl/ExtraOptions/test/Main.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module Main (main) where | ||
|
||
#ifdef FOO | ||
main :: IO () | ||
main = putStrLn "Test suite not yet implemented." | ||
#endif |