#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
CDROM_PRE="Using CD-ROM mount point $(readlink -f ./rootdir/media)/cdrom/
Unmounting CD-ROM...
Waiting for disc...
-Please insert a Disc in the drive and press enter
+Please insert a Disc in the drive and press [Enter]
Mounting CD-ROM...
Scanning disc for index files..."
CDROM_POST="This disc is called:
Repeat this process for the rest of the CDs in your set."
testsuccessequal "$CDROM_PRE
-Found 2 package indexes, 1 source indexes, 1 translation indexes and 1 signatures
+Found 3 package indexes, 1 source indexes, 1 translation indexes and 1 signatures
Found label 'Debian APT Testdisk 0.8.15'
$CDROM_POST" aptcdromlog add
# check Idempotence of apt-cdrom (and disabling of Translation dropping)
testsuccessequal "$CDROM_PRE
-Found 2 package indexes, 1 source indexes, 2 translation indexes and 1 signatures
+Found 3 package indexes, 1 source indexes, 2 translation indexes and 1 signatures
$CDROM_POST" aptcdromlog add -o APT::CDROM::DropTranslation=0
# take Translations from previous runs as needed
testsuccessequal "$CDROM_PRE
-Found 2 package indexes, 1 source indexes, 2 translation indexes and 1 signatures
+Found 3 package indexes, 1 source indexes, 2 translation indexes and 1 signatures
$CDROM_POST" aptcdromlog add
msgtest 'Test for the german description translation of' 'testing'
aptcache show testing -o Acquire::Languages=de | grep -q '^Description-de: ' && msgpass || msgfail
rm -rf rootdir/var/lib/apt/lists
testsuccessequal "$CDROM_PRE
-Found 2 package indexes, 1 source indexes, 1 translation indexes and 1 signatures
+Found 3 package indexes, 1 source indexes, 1 translation indexes and 1 signatures
$CDROM_POST" aptcdromlog add
msgtest 'Test for the english description translation of' 'testing'
aptcache show testing -o Acquire::Languages=en | grep -q '^Description-en: ' && msgpass || msgfail