X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/8c7af4d4c95d0423fbd0f3baa979792504f4f45f..29636cc759c6fbb92c6c462c90611eefb67cbbd4:/test/integration/test-apt-cache diff --git a/test/integration/test-apt-cache b/test/integration/test-apt-cache index a8ddfd889..bff1667e8 100755 --- a/test/integration/test-apt-cache +++ b/test/integration/test-apt-cache @@ -1,8 +1,8 @@ #!/bin/sh set -e -TESTDIR=$(readlink -f $(dirname $0)) -. $TESTDIR/framework +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" setupenvironment configarchitecture 'amd64' 'i386' @@ -34,6 +34,7 @@ testempty aptcache unmet dpkg testsuccess aptcache stats cp rootdir/tmp/testsuccess.output stats.output testsuccess test -s stats.output +testfailureequal 'E: apt-cache stats does not take any arguments' aptcache stats foo testsuccess aptcache xvcg foo cp rootdir/tmp/testsuccess.output xvcg.output testsuccess test -s xvcg.output @@ -45,16 +46,16 @@ testsuccess aptcache dump cp rootdir/tmp/testsuccess.output dump.output testsuccess test -s dump.output -testsuccessequal 'dpkg -bar +testsuccessequal 'bar +foo +dpkg specific -fancy -foo' aptcache pkgnames +fancy' aptcache pkgnames testsuccessequal 'bar' aptcache pkgnames bar -testsuccessequal 'fancy -foo' aptcache pkgnames f +testsuccessequal 'foo +fancy' aptcache pkgnames f -testsuccessequal " foo | 1 | file:$(readlink -f .)/aptarchive unstable/main amd64 Packages" aptcache madison foo +testsuccessequal " foo | 1 | file:$(readlink -f .)/aptarchive unstable/main all Packages" aptcache madison foo ### depends @@ -66,7 +67,6 @@ testsuccessequal 'foo testsuccessequal 'foo Depends: bar Conflicts: - Conflicts: |Recommends: Recommends: ' aptcache depends foo --implicit testsuccessequal 'foo @@ -76,7 +76,6 @@ testsuccessequal 'foo testsuccessequal 'foo Depends: bar Conflicts: - Conflicts: Recommends: ' aptcache depends foo -o APT::Cache::ShowOnlyFirstOr=1 --implicit testsuccessequal 'foo Depends: bar @@ -86,7 +85,6 @@ testsuccessequal 'foo testsuccessequal 'foo Depends: bar Conflicts: - Conflicts: |Recommends: (>= 2) Recommends: (<< 5)' aptcache depends foo -o APT::Cache::ShowVersion=1 --implicit testsuccessequal 'foo @@ -94,15 +92,13 @@ testsuccessequal 'foo Conflicts: ' aptcache depends foo --no-recommends testsuccessequal 'foo Depends: bar - Conflicts: - Conflicts: ' aptcache depends foo --no-recommends --implicit + Conflicts: ' aptcache depends foo --no-recommends --implicit testsuccessequal 'foo Depends: bar' aptcache depends foo --important --implicit testsuccessequal 'foo Conflicts: ' aptcache depends foo --important --no-depends --conflicts testsuccessequal 'foo - Conflicts: - Conflicts: ' aptcache depends foo --important --no-depends --conflicts --implicit + Conflicts: ' aptcache depends foo --important --no-depends --conflicts --implicit testsuccessequal 'foo Depends: bar Conflicts: @@ -118,17 +114,15 @@ bar testsuccessequal 'foo Depends: bar Conflicts: - Conflicts: |Recommends: Recommends: bar Depends: bar Breaks: foo - Breaks: Replaces: foo + Breaks: Replaces: - ' aptcache depends foo --recurse --implicit @@ -151,38 +145,39 @@ testsuccessequal 'bar testsuccessequal 'bar Depends: bar Breaks: foo - Breaks: Replaces: foo + Breaks: Replaces: ' aptcache depends bar --implicit + testsuccessequal 'specific Depends: - Depends: specific:amd64 - Breaks: foo:amd64 + Depends: + specific + Breaks: Replaces: ' aptcache depends specific testsuccessequal 'specific Depends: - Depends: specific:amd64 - Breaks: foo:amd64 + Depends: + specific + Breaks: Replaces: ' aptcache depends specific --implicit -## rdpends +## rdepends +# Note that specific does not appear in this list as it doesn't depend on foo, +# but on an arch-specific foo! testsuccessequal 'foo Reverse Depends: bar - specific bar' aptcache rdepends foo testsuccessequal 'foo Reverse Depends: Breaks: bar - Breaks: specific Replaces: bar' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1 testsuccessequal 'foo Reverse Depends: Breaks: bar (<< 1) - Breaks: specific (<< 1) Replaces: bar (<< 1)' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1 -o APT::Cache::ShowVersion=1 testsuccessequal 'foo Reverse Depends: - Breaks: bar (<< 1) - Breaks: specific (<< 1)' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1 -o APT::Cache::ShowVersion=1 --important --breaks + Breaks: bar (<< 1)' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1 -o APT::Cache::ShowVersion=1 --important --breaks