Skip to content

Commit

Permalink
fixed test suite, added backward-compat checker for other-files
Browse files Browse the repository at this point in the history
  • Loading branch information
SyntaxPolice committed Aug 16, 2005
1 parent 68b6152 commit e0ec810
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Distribution/PackageDescription.hs
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,8 @@ testPkgDesc = unlines [
"Build-Depends: haskell-src, HUnit>=1.0.0-rain",
"Other-Modules: Distribution.Package, Distribution.Version,",
" Distribution.Simple.GHCPackageConfig",
"Extra-Source-Files: file1, file2",
"Other-files: file1, file2",
"Extra-Tmp-Files: file1, file2",
"C-Sources: not/even/rain.c, such/small/hands",
"HS-Source-Dirs: src, src2",
"Exposed-Modules: Distribution.Void, Foo.Bar",
Expand Down Expand Up @@ -724,14 +725,15 @@ testPkgDescAnswer =
synopsis = "a nice package!",
description = "a really nice package!",
category = "tools",
extraSrcFiles=["file1", "file2"],
buildDepends = [Dependency "haskell-src" AnyVersion,
Dependency "HUnit"
(UnionVersionRanges (ThisVersion (Version [1,0,0] ["rain"]))
(LaterVersion (Version [1,0,0] ["rain"])))],
testedWith=[(GHC, AnyVersion)],
maintainer = "",
stability = "Free Text String",
extraTmpFiles=["file1", "file2"],
extraSrcFiles=["file1", "file2"],

library = Just $ Library {
exposedModules = ["Distribution.Void", "Foo.Bar"],
Expand Down
2 changes: 2 additions & 0 deletions Distribution/ParseUtils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ mkStanza ((n,xs):ys) =
let fld'' = map toLower fld'
fld | fld'' == "hs-source-dir"
= trace "The field \"hs-source-dir\" is deprecated, please use hs-source-dirs." "hs-source-dirs"
| fld'' == "other-files"
= trace "The field \"other-files\" is deprecated, please use extra-source-files." "extra-source-files"
| otherwise = fld''
ss <- mkStanza ys
checkDuplField fld ss
Expand Down

0 comments on commit e0ec810

Please sign in to comment.