@@ -261,6 +261,71 @@ main = cabalTest . withRepo "repo" . recordMode RecordMarked $ do
261261 log " checking if we detect when the same config is imported via many different paths (we don't)"
262262 woopping <- cabal' " v2-build" [ " --project-file=woops-0.project" ]
263263
264+ log " checking \" using config from message\" without URI imports"
265+ withDirectory " yops" $ do
266+ yopping <- fails $ cabal' " v2-build" [ " --project-file=../yops-0.project" ]
267+
268+ -- Use assertRegex when the output is tainted by the temp directory, like
269+ -- this:
270+ --
271+ -- When using configuration from:
272+ -- - /tmp/cabal-testsuite-286573/yops-0.project
273+ -- - /tmp/cabal-testsuite-286573/yops-2.config etc
274+ assertRegex
275+ " Project configuration is listed in full"
276+ " When using configuration from:\n \
277+ \ .*yops-0\\ .project\n \
278+ \ .*yops-2\\ .config\n \
279+ \ .*yops-4\\ .config\n \
280+ \ .*yops-6\\ .config\n \
281+ \ .*yops-8\\ .config\n \
282+ \ .*yops-1\\ .config\n \
283+ \ .*yops-3\\ .config\n \
284+ \ .*yops-5\\ .config\n \
285+ \ .*yops-7\\ .config\n \
286+ \ .*yops-9\\ .config\n "
287+ yopping
288+
289+ assertOutputContains
290+ (normalizeWindowsOutput " The following errors occurred: \
291+ \ - The package directory '.' does not contain any .cabal file." )
292+ yopping
293+
294+ return ()
295+
296+ log " checking \" using config from message\" with URI imports"
297+ withDirectory " woops" $ do
298+ woopping <- fails $ cabal' " v2-build" [ " --project-file=../woops-0.project" ]
299+
300+ -- Use assertRegex when the output is tainted by the temp directory, like
301+ -- this:
302+ --
303+ -- When using configuration from:
304+ -- - /tmp/cabal-testsuite-282695/woops-0.project
305+ -- - /tmp/cabal-testsuite-282695/woops-2.config etc
306+ assertRegex
307+ " Project configuration is listed in full"
308+ " When using configuration from:\n \
309+ \ .*woops-0\\ .project\n \
310+ \ .*woops-2\\ .config\n \
311+ \ .*woops-4\\ .config\n \
312+ \ .*woops-6\\ .config\n \
313+ \ .*woops-8\\ .config\n \
314+ \ .*woops-1\\ .config\n \
315+ \ .*woops-3\\ .config\n \
316+ \ .*woops-5\\ .config\n \
317+ \ .*woops-7\\ .config\n \
318+ \ .*woops-9\\ .config\n \
319+ \ .*https://www.stackage.org/lts-21.25/cabal.config\n "
320+ woopping
321+
322+ assertOutputContains
323+ (normalizeWindowsOutput " The following errors occurred: \
324+ \ - The package directory '.' does not contain any .cabal file." )
325+ woopping
326+
327+ return ()
328+
264329 log " checking bad conditional"
265330 badIf <- fails $ cabal' " v2-build" [ " --project-file=bad-conditional.project" ]
266331 assertOutputContains " Cannot set compiler in a conditional clause of a cabal project file" badIf
0 commit comments