From 73e655aeb5c2b74bcdb4295d89a9438d56a93635 Mon Sep 17 00:00:00 2001 From: Francesco Ariis Date: Wed, 22 Jun 2022 10:21:04 +0200 Subject: [PATCH] (cabal check) Add "No 'name' field." test --- .../Check/ConfiguredPackage/Sanity/NoName/cabal.out | 3 +++ .../Check/ConfiguredPackage/Sanity/NoName/cabal.test.hs | 5 +++++ .../Check/ConfiguredPackage/Sanity/NoName/pkg.cabal | 11 +++++++++++ 3 files changed, 19 insertions(+) create mode 100644 cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/NoName/cabal.out create mode 100644 cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/NoName/cabal.test.hs create mode 100644 cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/NoName/pkg.cabal diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/NoName/cabal.out b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/NoName/cabal.out new file mode 100644 index 000000000..ab6546674 --- /dev/null +++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/NoName/cabal.out @@ -0,0 +1,3 @@ +# cabal check +Warning: pkg.cabal:0:0: "name" field missing +Error: cabal: parse error diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/NoName/cabal.test.hs b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/NoName/cabal.test.hs new file mode 100644 index 000000000..f77c2e527 --- /dev/null +++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/NoName/cabal.test.hs @@ -0,0 +1,5 @@ +import Test.Cabal.Prelude + +-- No package name. +main = cabalTest $ + fails $ cabal "check" [] diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/NoName/pkg.cabal b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/NoName/pkg.cabal new file mode 100644 index 000000000..5dfbc3896 --- /dev/null +++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/NoName/pkg.cabal @@ -0,0 +1,11 @@ +cabal-version: 2.2 +synopsis: synopsis +description: description +version: 0 +category: example +maintainer: none@example.com +license: GPL-3.0-or-later + +library + exposed-modules: Foo + default-language: Haskell2010 -- 2.11.4.GIT