Commit 9db90bf5 authored by John Ericson's avatar John Ericson Committed by John Ericson
Browse files

Add end-to-end cabal-install test for "build-tool-depends"

Modeled after the extern_build_tools test
parent a691fb90
......@@ -85,6 +85,12 @@ Extra-Source-Files:
tests/IntegrationTests/new-build/T4017/cabal.project
tests/IntegrationTests/new-build/T4017/p/p.cabal
tests/IntegrationTests/new-build/T4017/q/q.cabal
tests/IntegrationTests/new-build/build_tool_depends.sh
tests/IntegrationTests/new-build/build_tool_depends/cabal.project
tests/IntegrationTests/new-build/build_tool_depends/client/Hello.hs
tests/IntegrationTests/new-build/build_tool_depends/client/client.cabal
tests/IntegrationTests/new-build/build_tool_depends/pre-proc/MyCustomPreprocessor.hs
tests/IntegrationTests/new-build/build_tool_depends/pre-proc/pre-proc.cabal
tests/IntegrationTests/new-build/executable/Main.hs
tests/IntegrationTests/new-build/executable/Setup.hs
tests/IntegrationTests/new-build/executable/Test.hs
......
. ./common.sh
cd build_tool_depends
cabal new-build client
{-# OPTIONS_GHC -F -pgmF zero-to-one #-}
module Main where
a :: String
a = "0000"
main :: IO ()
main = putStrLn a
name: client
version: 0.1.0.0
synopsis: Checks build-tool-depends are put in PATH
license: BSD3
category: Testing
build-type: Simple
cabal-version: >=1.10
executable hello-world
main-is: Hello.hs
build-depends: base
build-tool-depends: pre-proc:zero-to-one
default-language: Haskell2010
module Main where
import System.Environment
import System.IO
main :: IO ()
main = do
(_:source:target:_) <- getArgs
let f '0' = '1'
f c = c
writeFile target . map f =<< readFile source
name: pre-proc
version: 999.999.999
synopsis: Checks build-tool-depends are put in PATH
license: BSD3
category: Testing
build-type: Simple
cabal-version: >=1.10
executable zero-to-one
main-is: MyCustomPreprocessor.hs
build-depends: base, directory
default-language: Haskell2010
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment