Commit 0d870746 authored by quasicomputational's avatar quasicomputational Committed by Mikhail Glushenkov

outdated: document and test last-one-wins behaviour of new-freeze flags

parent eb0a3ff0
......@@ -1336,10 +1336,12 @@ The following flags are supported by the ``outdated`` command:
``--new-freeze-file``
Read dependency version bounds from the new-style freeze file
(``cabal.project.freeze``) instead of the package description file.
This is equivalent to ``--project-file cabal.project``.
``--project-file`` *PROJECTFILE*
Read dependendency version bounds from the new-style freeze file
related to the named project file (i.e., ``$PROJECTFILE.freeze``)
instead of the package desctription file.
instead of the package desctription file. If multiple ``--project-file``
flags are provided, only the final one is considered.
``--simple-output``
Print only the names of outdated dependencies, one per line.
``--exit-code``
......
......@@ -3,3 +3,13 @@ Downloading the latest package list from test-local-repo
# cabal outdated
Outdated dependencies:
base ==3.0.3.2 (latest: 4.0.0.0)
# cabal outdated
Outdated dependencies:
base ==3.0.3.2 (latest: 4.0.0.0)
# cabal outdated
Outdated dependencies:
base ==3.0.3.2 (latest: 4.0.0.0)
# cabal outdated
Outdated dependencies:
base ==3.0.3.2 (latest: 4.0.0.0)
template-haskell ==2.3.0.0 (latest: 2.4.0.0)
......@@ -4,3 +4,15 @@ main = cabalTest $ withRepo "repo" $ do
assertOutputContains "base" res
assertOutputDoesNotContain "template-haskell" res
-- Test last-one-wins behaviour.
res <- cabal' "outdated" ["--project-file", "cabal.project", "--project-file", "variant.project"]
assertOutputContains "base" res
assertOutputDoesNotContain "template-haskell" res
res <- cabal' "outdated" ["--new-freeze-file", "--project-file", "variant.project"]
assertOutputContains "base" res
assertOutputDoesNotContain "template-haskell" res
res <- cabal' "outdated" ["--project-file", "variant.project", "--new-freeze-file"]
assertOutputContains "base" res
assertOutputContains "template-haskell" res
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment