#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
testdpkginstalled b c
testmarkedauto 'b'
-testequal 'Reading package lists...
+testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
-b is already the newest version.
+b is already the newest version (1.0).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b --only-upgrade
testmarkedauto 'b'
-testequal 'Reading package lists...
+testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
-b is already the newest version.
+b is already the newest version (1.0).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b -d
testmarkedauto 'b'
testfileequal 'rootdir/var/log/apt/history.log' '
Reinstall: b:i386 (1.0)'
-testequal 'Reading package lists...
+testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
-b is already the newest version.
+b is already the newest version (1.0).
b set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b
testmarkedauto