-
Notifications
You must be signed in to change notification settings - Fork 691
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Distribution.Simple | ||
|
||
main = defaultMain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module Simple where | ||
|
||
-- | For hiding needles. | ||
data Haystack = Haystack |
3 changes: 3 additions & 0 deletions
3
cabal-testsuite/PackageTests/HaddockKeepTmpsCustom/cabal.project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
packages: . | ||
|
||
haddock-keep-temp-files: true |
15 changes: 15 additions & 0 deletions
15
cabal-testsuite/PackageTests/HaddockKeepTmpsCustom/cabal.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{-# LANGUAGE LambdaCase #-} | ||
|
||
import Test.Cabal.Prelude | ||
|
||
-- Test that "cabal haddock" preserves temporary files | ||
-- We use haddock-keep-temp-file: True in the cabal.project. | ||
main = cabalTest $ recordMode DoNotRecord $ withProjectFile "cabal.project" $ do | ||
cabal "haddock" [] | ||
|
||
-- Check that there is a response file. | ||
responseFiles <- assertGlobMatchesTestDir testDistDir "**/haddock-response*.txt" | ||
|
||
-- Check that the matched response file is not empty, and is indeed a Haddock | ||
-- response file. | ||
assertAnyFileDoesContain responseFiles "--package-name" |
16 changes: 16 additions & 0 deletions
16
cabal-testsuite/PackageTests/HaddockKeepTmpsCustom/my.cabal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
cabal-version: 3.0 | ||
name: HaddockKeepsTmpsCustom | ||
version: 0.1 | ||
license: BSD-3-Clause | ||
author: Rodrigo Mesquita | ||
stability: stable | ||
category: PackageTests | ||
build-type: Custom | ||
|
||
custom-setup | ||
setup-depends: Cabal, base | ||
|
||
library | ||
default-language: Haskell2010 | ||
exposed-modules: Simple | ||
build-depends: base |