Unverified Commit 896620f1 authored by Mikhail Glushenkov's avatar Mikhail Glushenkov Committed by Mikhail Glushenkov
Browse files

Tests for 'cabal outdated'.

parent d64095c7
......@@ -111,6 +111,11 @@ Extra-Source-Files:
tests/IntegrationTests/new-build/monitor_cabal_files/q/Setup.hs
tests/IntegrationTests/new-build/monitor_cabal_files/q/q-broken.cabal.in
tests/IntegrationTests/new-build/monitor_cabal_files/q/q-fixed.cabal.in
tests/IntegrationTests/outdated/cabal.project
tests/IntegrationTests/outdated/my.cabal
tests/IntegrationTests/outdated/outdated.sh
tests/IntegrationTests/outdated/outdated_freeze.sh
tests/IntegrationTests/outdated/outdated_new_freeze.sh
tests/IntegrationTests/regression/t2755.sh
tests/IntegrationTests/regression/t2755/A.hs
tests/IntegrationTests/regression/t2755/Setup.hs
......
constraints: base == 3.0.3.2, template-haskell ==2.3.0.0
name: my
version: 0.1
license: BSD3
cabal-version: >= 1.20.0
build-type: Simple
library
exposed-modules: Foo
build-depends: base >= 3 && < 4, template-haskell >= 2.3.0.0 && < 2.4
. ./common.sh
OUTPUT=`cabal outdated`
echo $OUTPUT | grep base || die "should have listed 'base' as outdated"
echo $OUTPUT | grep template-haskell \
|| die "should have listed 'template-haskell' as outdated"
OUTPUT=`cabal outdated --ignore=base`
echo $OUTPUT | grep -v base || die "shouldn't have listed 'base' as outdated"
echo $OUTPUT | grep template-haskell \
|| die "should have listed 'template-haskell' as outdated"
OUTPUT=`cabal outdated --ignore=base,template-haskell`
echo $OUTPUT | grep -v base || die "shouldn't have listed 'base' as outdated"
echo $OUTPUT | grep -v template-haskell \
|| die "shouldn't have listed 'template-haskell' as outdated"
OUTPUT=`cabal outdated --minor=base`
echo $OUTPUT | grep -v base || die "shouldn't have listed 'base' as outdated"
echo $OUTPUT | grep template-haskell \
|| die "should have listed 'template-haskell' as outdated"
OUTPUT=`cabal outdated --minor=base,template-haskell`
echo $OUTPUT | grep -v base || die "shouldn't have listed 'base' as outdated"
echo $OUTPUT | grep -v template-haskell \
|| die "shouldn't have listed 'template-haskell' as outdated"
. ./common.sh
OUTPUT=`cabal outdated --freeze-file`
echo $OUTPUT | grep base || die "should have listed 'base' as outdated"
echo $OUTPUT | grep template-haskell \
|| die "should have listed 'base' as outdated"
cabal outdated --freeze-file --ignore=base | grep -v base \
|| die "shouldn't have listed 'base' as outdated"
cabal outdated --freeze-file --minor=base | grep -v base \
|| die "shouldn't have listed 'base' as outdated"
cabal outdated --freeze-file --ignore=template-haskell \
| grep -v template-haskell \
|| die "shouldn't have listed template-haskell as outdated"
cabal outdated --freeze-file --minor=template-haskell | grep template-haskell \
|| die "should have listed template-haskell as outdated"
. ./common.sh
OUTPUT=`cabal outdated --new-freeze-file`
echo $OUTPUT | grep base || die "should have listed 'base' as outdated"
echo $OUTPUT | grep template-haskell \
|| die "should have listed 'base' as outdated"
cabal outdated --new-freeze-file --ignore=base | grep -v base \
|| die "shouldn't have listed 'base' as outdated"
cabal outdated --new-freeze-file --minor=base | grep -v base \
|| die "shouldn't have listed 'base' as outdated"
cabal outdated --new-freeze-file --ignore=template-haskell \
| grep -v template-haskell \
|| die "shouldn't have listed template-haskell as outdated"
cabal outdated --new-freeze-file --minor=template-haskell \
| grep template-haskell \
|| die "should have listed template-haskell as outdated"
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