#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
# apt-extracttemplates needs this
insertinstalledpackage 'pkg-with-template' 'amd64' '1.0'
-# build a simple package that contains a config and a tempalte
+# build a simple package that contains a config and a template
mkdir -p DEBIAN
CONFIG_STR="#!/bin/sh
random shell stuff
OUT='rootdir/tmp/testsuccess.output'
testequal "$1" cut -f1 -d' ' $OUT
if [ -n "$2" ]; then
- testequal '' cut -f2 -d' ' $OUT
+ testequal '' cut -s -f2 -d' ' $OUT
else
testequal '1.0' cut -f2 -d' ' $OUT
fi