-
Notifications
You must be signed in to change notification settings - Fork 698
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
1 parent
7ef7c23
commit 0f1a81b
Showing
4 changed files
with
30 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,14 @@ | ||
# checking project import with trailing space | ||
# cabal v2-build | ||
Error: [Cabal-7090] | ||
Error parsing project file <ROOT>/trailing-space.project: | ||
import has whitespace; | ||
'https://www.stackage.org/nightly-2024-12-05/cabal.config ' | ||
imported by: trailing-space.project | ||
# checking project import with tabs and spaces | ||
# cabal v2-build | ||
Error: [Cabal-7090] | ||
Error parsing project file <ROOT>/tabs-and-spaces.project: | ||
import has whitespace; | ||
'https://www.stackage.org/nightly-2024-12-05/cabal.config ' | ||
imported by: tabs-and-spaces.project |
12 changes: 12 additions & 0 deletions
12
cabal-testsuite/PackageTests/UntrimmedImport/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,12 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest . recordMode RecordMarked $ do | ||
let log = recordHeader . pure | ||
|
||
log "checking project import with trailing space" | ||
trailing <- fails $ cabal' "v2-build" [ "--project-file=trailing-space.project" ] | ||
assertOutputContains "import has whitespace" trailing | ||
assertOutputContains "'https://www.stackage.org/nightly-2024-12-05/cabal.config '" trailing | ||
|
||
log "checking project import with tabs and spaces" | ||
fails $ cabal "v2-build" [ "--project-file=tabs-and-spaces.project" ] |
2 changes: 2 additions & 0 deletions
2
cabal-testsuite/PackageTests/UntrimmedImport/tabs-and-spaces.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,2 @@ | ||
optional-packages: . | ||
import: https://www.stackage.org/nightly-2024-12-05/cabal.config |
2 changes: 2 additions & 0 deletions
2
cabal-testsuite/PackageTests/UntrimmedImport/trailing-space.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,2 @@ | ||
optional-packages: . | ||
import: https://www.stackage.org/nightly-2024-12-05/cabal.config |