diff --git a/cabal-testsuite/PackageTests/ProjectImport/ParseErrorProvenance/cabal.out b/cabal-testsuite/PackageTests/ProjectImport/ParseErrorProvenance/cabal.out new file mode 100644 index 00000000000..77a1861fe42 --- /dev/null +++ b/cabal-testsuite/PackageTests/ProjectImport/ParseErrorProvenance/cabal.out @@ -0,0 +1,2 @@ +# cabal v2-build +Warning: /else.project, else.project: Unrecognized section '_' on line 3 diff --git a/cabal-testsuite/PackageTests/ProjectImport/ParseErrorProvenance/cabal.test.hs b/cabal-testsuite/PackageTests/ProjectImport/ParseErrorProvenance/cabal.test.hs new file mode 100644 index 00000000000..7b4e550259c --- /dev/null +++ b/cabal-testsuite/PackageTests/ProjectImport/ParseErrorProvenance/cabal.test.hs @@ -0,0 +1,13 @@ +import Test.Cabal.Prelude + +main = cabalTest . recordMode RecordMarked $ do + let log = recordHeader . pure + + outElse <- fails $ cabal' "v2-build" [ "all", "--dry-run", "--project-file=else.project" ] + assertOutputContains + (normalizeWindowsOutput "When using configuration from: \ + \ - else.project \ + \ - dir-else/else.config") + outElse + + return () diff --git a/cabal-testsuite/PackageTests/ProjectImport/ParseErrorProvenance/dir-else/else.config b/cabal-testsuite/PackageTests/ProjectImport/ParseErrorProvenance/dir-else/else.config new file mode 100644 index 00000000000..f9c44e63d5b --- /dev/null +++ b/cabal-testsuite/PackageTests/ProjectImport/ParseErrorProvenance/dir-else/else.config @@ -0,0 +1,4 @@ +if false +else + _ + packages: no-pkg-here diff --git a/cabal-testsuite/PackageTests/ProjectImport/ParseErrorProvenance/else.project b/cabal-testsuite/PackageTests/ProjectImport/ParseErrorProvenance/else.project new file mode 100644 index 00000000000..959c40f5660 --- /dev/null +++ b/cabal-testsuite/PackageTests/ProjectImport/ParseErrorProvenance/else.project @@ -0,0 +1 @@ +import: dir-else/else.config