From 5f5c040242f0a7e49db1e8372da3f88485a9b853 Mon Sep 17 00:00:00 2001 From: Francesco Ariis Date: Fri, 17 Jun 2022 17:17:32 +0200 Subject: [PATCH] Add expectBroken test for #7423 --- .../PackageTests/Check/NoWarnFlag/cabal.out | 2 ++ .../Check/NoWarnFlag/cabal.test.hs | 3 +++ .../PackageTests/Check/NoWarnFlag/pkg.cabal | 18 ++++++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 cabal-testsuite/PackageTests/Check/NoWarnFlag/cabal.out create mode 100644 cabal-testsuite/PackageTests/Check/NoWarnFlag/cabal.test.hs create mode 100644 cabal-testsuite/PackageTests/Check/NoWarnFlag/pkg.cabal diff --git a/cabal-testsuite/PackageTests/Check/NoWarnFlag/cabal.out b/cabal-testsuite/PackageTests/Check/NoWarnFlag/cabal.out new file mode 100644 index 00000000000..37aa169b416 --- /dev/null +++ b/cabal-testsuite/PackageTests/Check/NoWarnFlag/cabal.out @@ -0,0 +1,2 @@ +# cabal check +No errors or warnings could be found in the package. diff --git a/cabal-testsuite/PackageTests/Check/NoWarnFlag/cabal.test.hs b/cabal-testsuite/PackageTests/Check/NoWarnFlag/cabal.test.hs new file mode 100644 index 00000000000..d8aee790e1f --- /dev/null +++ b/cabal-testsuite/PackageTests/Check/NoWarnFlag/cabal.test.hs @@ -0,0 +1,3 @@ +import Test.Cabal.Prelude + +main = cabalTest . expectBroken 7423 $ cabal "check" [] diff --git a/cabal-testsuite/PackageTests/Check/NoWarnFlag/pkg.cabal b/cabal-testsuite/PackageTests/Check/NoWarnFlag/pkg.cabal new file mode 100644 index 00000000000..da87e698285 --- /dev/null +++ b/cabal-testsuite/PackageTests/Check/NoWarnFlag/pkg.cabal @@ -0,0 +1,18 @@ +cabal-version: 2.2 +name: pkg +version: 0 +category: example +maintainer: none@example.com +synopsis: synopsys +description: description +license: GPL-3.0-or-later + +flag force-O2 + default: False + manual: True + +library + exposed-modules: Foo + default-language: Haskell2010 + if flag(force-O2) + ghc-options: -O2