diff options
author | David Kalnischkies <david@kalnischkies.de> | 2015-12-15 17:20:26 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2015-12-19 23:04:34 +0100 |
commit | 3abb6a6a1e485b3bc899b64b0a1b7dc2db25a9c2 (patch) | |
tree | 9be704b4ba97242990c1380f53c6b44ecce2f6af /test/integration/test-apt-tagfile-fields-order | |
parent | 85a67355c0340596630a47f85507d61c68dcbd0e (diff) |
tests: support spaces in path and TMPDIR
This doesn't allow all tests to run cleanly, but it at least allows to
write tests which could run successfully in such environments.
Git-Dch: Ignore
Diffstat (limited to 'test/integration/test-apt-tagfile-fields-order')
-rwxr-xr-x | test/integration/test-apt-tagfile-fields-order | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/integration/test-apt-tagfile-fields-order b/test/integration/test-apt-tagfile-fields-order index 27d5c14ff..4af58aabb 100755 --- a/test/integration/test-apt-tagfile-fields-order +++ b/test/integration/test-apt-tagfile-fields-order @@ -1,8 +1,8 @@ #!/bin/sh set -e -TESTDIR=$(readlink -f $(dirname $0)) -. $TESTDIR/framework +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" setupenvironment dpkg_field_ordered_list() { @@ -31,7 +31,7 @@ comparelsts() { msgtest 'Check that apt knows all fields dpkg orders in' 'Packages' dpkg_field_ordered_list 'CTRL_INDEX_PKG' > dpkg.lst -sed -ne 's#^ "\(.*\)",.*$#\1#p' ${SOURCEDIRECTORY}/apt-pkg/tagfile-order.c | sed -n '/^Package$/,/^Package$/ p' | head -n -1 | sort -u > apt.lst +sed -ne 's#^ "\(.*\)",.*$#\1#p' "${SOURCEDIRECTORY}/apt-pkg/tagfile-order.c" | sed -n '/^Package$/,/^Package$/ p' | head -n -1 | sort -u > apt.lst comparelsts msgtest 'Check that apt knows all fields dpkg orders in' 'status' @@ -45,7 +45,7 @@ comparelsts msgtest 'Check that apt knows all fields dpkg orders in' 'Sources' dpkg_field_ordered_list 'CTRL_INDEX_SRC' > dpkg.lst echo 'Package' > apt.tmp -sed -ne 's#^ "\(.*\)",.*$#\1#p' ${SOURCEDIRECTORY}/apt-pkg/tagfile-order.c | sed '/^Package$/,/^Package$/ d' >> apt.tmp +sed -ne 's#^ "\(.*\)",.*$#\1#p' "${SOURCEDIRECTORY}/apt-pkg/tagfile-order.c" | sed '/^Package$/,/^Package$/ d' >> apt.tmp sort -u apt.tmp > apt.lst comparelsts @@ -63,7 +63,7 @@ if [ "$USER" = 'david' ]; then msgpass msgtest 'Check that apt knows about all fields' 'dpkg parses' sed -n 's#^.*FIELD("\(.*\)").*$#\1#p' "${DPKGSOURCE}" | sort -u > dpkg.lst - sed -ne 's#^ "\(.*\)",.*$#\1#p' ${SOURCEDIRECTORY}/apt-pkg/tagfile-order.c | sed -n '/^Package$/,/^Package$/ p' | head -n -1 | sort -u > apt.lst + sed -ne 's#^ "\(.*\)",.*$#\1#p' "${SOURCEDIRECTORY}/apt-pkg/tagfile-order.c" | sed -n '/^Package$/,/^Package$/ p' | head -n -1 | sort -u > apt.lst comparelsts fi @@ -76,7 +76,7 @@ if [ "$USER" = 'david' ]; then msgtest 'Check that apt knows about all fields' 'dak knows' # dak mixes both, so we can only check with the mixed one as well sed -ne "s#^.* VALUES ('\(.*\)', \(.*\)).*\$#\1 \2#p" "${DAKSOURCE}" | cut -d ' ' -f 1 | sort -u > dpkg.lst - sed -ne 's#^ "\(.*\)",.*$#\1#p' ${SOURCEDIRECTORY}/apt-pkg/tagfile-order.c | sort -u > apt.lst + sed -ne 's#^ "\(.*\)",.*$#\1#p' "${SOURCEDIRECTORY}/apt-pkg/tagfile-order.c" | sort -u > apt.lst comparelsts fi fi |