From 2eb3cf7c3fa982baa6b2587af6079b53fd4f1904 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Mon, 1 Jan 2018 17:24:36 -0500 Subject: [PATCH] Test case for #4986 Signed-off-by: Edward Z. Yang --- .../PackageTests/Regression/T4986/cabal.out | 6 ++++++ .../PackageTests/Regression/T4986/cabal.project | 1 + .../PackageTests/Regression/T4986/cabal.test.hs | 4 ++++ .../PackageTests/Regression/T4986/client/Hello.hs | 1 + .../Regression/T4986/client/client.cabal | 14 ++++++++++++++ .../PackageTests/Regression/T4986/happy/Main.hs | 1 + .../Regression/T4986/happy/happy.cabal | 12 ++++++++++++ 7 files changed, 39 insertions(+) create mode 100644 cabal-testsuite/PackageTests/Regression/T4986/cabal.out create mode 100644 cabal-testsuite/PackageTests/Regression/T4986/cabal.project create mode 100644 cabal-testsuite/PackageTests/Regression/T4986/cabal.test.hs create mode 100644 cabal-testsuite/PackageTests/Regression/T4986/client/Hello.hs create mode 100644 cabal-testsuite/PackageTests/Regression/T4986/client/client.cabal create mode 100644 cabal-testsuite/PackageTests/Regression/T4986/happy/Main.hs create mode 100644 cabal-testsuite/PackageTests/Regression/T4986/happy/happy.cabal diff --git a/cabal-testsuite/PackageTests/Regression/T4986/cabal.out b/cabal-testsuite/PackageTests/Regression/T4986/cabal.out new file mode 100644 index 00000000000..3ce7bcc07fd --- /dev/null +++ b/cabal-testsuite/PackageTests/Regression/T4986/cabal.out @@ -0,0 +1,6 @@ +# cabal new-configure +Resolving dependencies... +Build profile: -w ghc- -O1 +In order, the following would be built: + - happy-999.999.999 (exe:happy) (first run) + - client-0.1.0.0 (exe:hello-world) (first run) diff --git a/cabal-testsuite/PackageTests/Regression/T4986/cabal.project b/cabal-testsuite/PackageTests/Regression/T4986/cabal.project new file mode 100644 index 00000000000..b5377830e88 --- /dev/null +++ b/cabal-testsuite/PackageTests/Regression/T4986/cabal.project @@ -0,0 +1 @@ +packages: client, happy diff --git a/cabal-testsuite/PackageTests/Regression/T4986/cabal.test.hs b/cabal-testsuite/PackageTests/Regression/T4986/cabal.test.hs new file mode 100644 index 00000000000..a18f88b8045 --- /dev/null +++ b/cabal-testsuite/PackageTests/Regression/T4986/cabal.test.hs @@ -0,0 +1,4 @@ +import Test.Cabal.Prelude +main = cabalTest $ + withSourceCopy $ + cabal "new-configure" [] diff --git a/cabal-testsuite/PackageTests/Regression/T4986/client/Hello.hs b/cabal-testsuite/PackageTests/Regression/T4986/client/Hello.hs new file mode 100644 index 00000000000..b3549c2fe3d --- /dev/null +++ b/cabal-testsuite/PackageTests/Regression/T4986/client/Hello.hs @@ -0,0 +1 @@ +main = return () diff --git a/cabal-testsuite/PackageTests/Regression/T4986/client/client.cabal b/cabal-testsuite/PackageTests/Regression/T4986/client/client.cabal new file mode 100644 index 00000000000..de5997dba36 --- /dev/null +++ b/cabal-testsuite/PackageTests/Regression/T4986/client/client.cabal @@ -0,0 +1,14 @@ +name: client +version: 0.1.0.0 +synopsis: Checks build-tools 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-tools: happy + build-tool-depends: happy:happy + default-language: Haskell2010 diff --git a/cabal-testsuite/PackageTests/Regression/T4986/happy/Main.hs b/cabal-testsuite/PackageTests/Regression/T4986/happy/Main.hs new file mode 100644 index 00000000000..b3549c2fe3d --- /dev/null +++ b/cabal-testsuite/PackageTests/Regression/T4986/happy/Main.hs @@ -0,0 +1 @@ +main = return () diff --git a/cabal-testsuite/PackageTests/Regression/T4986/happy/happy.cabal b/cabal-testsuite/PackageTests/Regression/T4986/happy/happy.cabal new file mode 100644 index 00000000000..822b9f08e12 --- /dev/null +++ b/cabal-testsuite/PackageTests/Regression/T4986/happy/happy.cabal @@ -0,0 +1,12 @@ +name: happy +version: 999.999.999 +synopsis: Checks double-dependency on build-tool works correctly +license: BSD3 +category: Testing +build-type: Simple +cabal-version: >=1.10 + +executable happy + main-is: Main.hs + build-depends: base + default-language: Haskell2010