Skip to content

Commit

Permalink
Add (failing) tests for issue haskell#5055 [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
phadej committed Jan 29, 2018
1 parent 7d7916c commit b1e3689
Show file tree
Hide file tree
Showing 7 changed files with 291 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Cabal/Cabal.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ extra-source-files:
tests/ParserTests/errors/forward-compat2.errors
tests/ParserTests/errors/forward-compat3.cabal
tests/ParserTests/errors/forward-compat3.errors
tests/ParserTests/errors/issue-5055.cabal
tests/ParserTests/errors/issue-5055.errors
tests/ParserTests/errors/leading-comma.cabal
tests/ParserTests/errors/leading-comma.errors
tests/ParserTests/errors/range-ge-wild.cabal
Expand Down Expand Up @@ -82,6 +84,9 @@ extra-source-files:
tests/ParserTests/regressions/generics-sop.expr
tests/ParserTests/regressions/generics-sop.format
tests/ParserTests/regressions/haddock-api-2.18.1-check.cabal
tests/ParserTests/regressions/issue-5055.cabal
tests/ParserTests/regressions/issue-5055.expr
tests/ParserTests/regressions/issue-5055.format
tests/ParserTests/regressions/issue-774.cabal
tests/ParserTests/regressions/issue-774.expr
tests/ParserTests/regressions/issue-774.format
Expand Down
2 changes: 2 additions & 0 deletions Cabal/tests/ParserTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ errorTests = testGroup "errors"
, errorTest "forward-compat.cabal"
, errorTest "forward-compat2.cabal"
, errorTest "forward-compat3.cabal"
, errorTest "issue-5055.cabal"
]

errorTest :: FilePath -> TestTree
Expand Down Expand Up @@ -136,6 +137,7 @@ regressionTests = testGroup "regressions"
, regressionTest "leading-comma.cabal"
, regressionTest "wl-pprint-indef.cabal"
, regressionTest "th-lift-instances.cabal"
, regressionTest "issue-5055.cabal"
]

regressionTest :: FilePath -> TestTree
Expand Down
21 changes: 21 additions & 0 deletions Cabal/tests/ParserTests/errors/issue-5055.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: issue
version: 5055
synopsis: no type in all branches
description: no type in all branches.
license: BSD3
category: Test
build-type: Simple
cabal-version: >=2.0

executable flag-test-exe
main-is: FirstMain.hs
build-depends: base >= 4.8 && < 5
default-language: Haskell2010

test-suite flag-cabal-test
build-depends: base >= 4.8 && < 5
default-language: Haskell2010

if os(windows)
main-is: FirstMain.hs
type: exitcode-stdio-1.0
1 change: 1 addition & 0 deletions Cabal/tests/ParserTests/errors/issue-5055.errors
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ERROR
23 changes: 23 additions & 0 deletions Cabal/tests/ParserTests/regressions/issue-5055.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: issue
version: 5055
synopsis: no type in all branches
description: no type in all branches.
license: BSD3
category: Test
build-type: Simple
cabal-version: >=2.0

executable flag-test-exe
main-is: FirstMain.hs
build-depends: base >= 4.8 && < 5
default-language: Haskell2010

test-suite flag-cabal-test
type: exitcode-stdio-1.0
build-depends: base >= 4.8 && < 5
default-language: Haskell2010

if os(windows)
main-is: FirstMain.hs
else:
main-is: SecondMain.hs
214 changes: 214 additions & 0 deletions Cabal/tests/ParserTests/regressions/issue-5055.expr

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions Cabal/tests/ParserTests/regressions/issue-5055.format
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
cabal-version: >=2.0
name: issue
version: 5055
license: BSD3
synopsis: no type in all branches
description:
no type in all branches.
category: Test
build-type: Simple

executable flag-test-exe
main-is: FirstMain.hs
scope: unknown
default-language: Haskell2010
build-depends:
base >=4.8 && <5

test-suite flag-cabal-test
default-language: Haskell2010
build-depends:
base >=4.8 && <5

if os(windows)
type: exitcode-stdio-1.0
main-is: FirstMain.hs

0 comments on commit b1e3689

Please sign in to comment.