#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
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
- foo | 1 | file:$(readlink -f .)/aptarchive unstable/main i386 Packages" aptcache madison foo
+testsuccessequal " foo | 1 | file:$(readlink -f .)/aptarchive unstable/main all Packages" aptcache madison foo
### depends
Depends: bar
Breaks: foo
Replaces: foo
+ Breaks: <foo:i386>
+ Replaces: <foo:i386>
<foobar>
<cool>
-<cooler>' aptcache depends foo --recurse --implicit
+<cooler>
+<foo:i386>' aptcache depends foo --recurse --implicit
testsuccessequal 'foo
Depends: bar
bar
Depends: bar
bar
Depends: bar
- Replaces: foo' aptcache depends foo --recurse --important --replaces --implicit
+ Replaces: foo
+ Replaces: <foo:i386>
+<foo:i386>' aptcache depends foo --recurse --important --replaces --implicit
testsuccessequal 'bar
Depends: bar
Breaks: foo
testsuccessequal 'bar
Depends: bar
Breaks: foo
- Replaces: foo' aptcache depends bar --implicit
+ Replaces: foo
+ Breaks: <foo:i386>
+ Replaces: <foo:i386>' aptcache depends bar --implicit
testsuccessequal 'specific
Depends: <bar:i386>