From db5dfe5f6d68226a872facaf87020630260716e0 Mon Sep 17 00:00:00 2001 From: Francesco Ariis Date: Wed, 22 Jun 2022 16:43:23 +0200 Subject: [PATCH] (cabal check) Add "Autogen include" test for ts All in `autogen-includes` hs to be in either `includes` or `install-includes` (testsuite). --- .../Sanity/AutogenIncludesTestsuite/cabal.out | 4 ++++ .../Sanity/AutogenIncludesTestsuite/cabal.test.hs | 6 ++++++ .../Sanity/AutogenIncludesTestsuite/pkg.cabal | 14 ++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesTestsuite/cabal.out create mode 100644 cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesTestsuite/cabal.test.hs create mode 100644 cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesTestsuite/pkg.cabal diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesTestsuite/cabal.out b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesTestsuite/cabal.out new file mode 100644 index 000000000..9e561d018 --- /dev/null +++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesTestsuite/cabal.out @@ -0,0 +1,4 @@ +# cabal check +Warning: The package will not build sanely due to these errors: +Warning: An include in 'autogen-includes' is not in 'includes'. +Warning: Hackage would reject this package. diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesTestsuite/cabal.test.hs b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesTestsuite/cabal.test.hs new file mode 100644 index 000000000..4831b0d10 --- /dev/null +++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesTestsuite/cabal.test.hs @@ -0,0 +1,6 @@ +import Test.Cabal.Prelude + +-- All `autogen-includes` should appear in `install-includes` or +-- `includes` (testsuite). +main = cabalTest $ + fails $ cabal "check" [] diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesTestsuite/pkg.cabal b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesTestsuite/pkg.cabal new file mode 100644 index 000000000..77c3dea90 --- /dev/null +++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesTestsuite/pkg.cabal @@ -0,0 +1,14 @@ +cabal-version: 3.0 +name: pkg +synopsis: synopsis +description: description +version: 0 +category: example +maintainer: none@example.com +license: GPL-3.0-or-later + +test-suite test + main-is: Main.hs + autogen-includes: AutoGenInc + default-language: Haskell2010 + type: exitcode-stdio-1.0 -- 2.11.4.GIT