summaryrefslogtreecommitdiff
path: root/test/integration/test-bug-738785-switch-protocol
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-09-14 02:26:13 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-09-14 15:22:19 +0200
commit63c7141275c8c5c0f6e60f5242785e50cabaf2a0 (patch)
tree966f2998236fca9799395f3f3d05cf82b1ac5a98 /test/integration/test-bug-738785-switch-protocol
parentfecfbf2e4cbb71d20364306baf6aa7886c5f3ecd (diff)
tests: try to support spaces in TMPDIR
Not all tests work yet, most notable the cdrom tests, but those require changes in libapt itself to have a proper fix and what we have fixed so far is good enough progress for now. Git-Dch: Ignore
Diffstat (limited to 'test/integration/test-bug-738785-switch-protocol')
-rwxr-xr-xtest/integration/test-bug-738785-switch-protocol15
1 files changed, 9 insertions, 6 deletions
diff --git a/test/integration/test-bug-738785-switch-protocol b/test/integration/test-bug-738785-switch-protocol
index e86f28824..d925a70bb 100755
--- a/test/integration/test-bug-738785-switch-protocol
+++ b/test/integration/test-bug-738785-switch-protocol
@@ -42,12 +42,15 @@ testdpkginstalled 'apt'
# install a slowed down file: otherwise its to fast to reproduce combining
NEWMETHODS="$(readlink -f rootdir)/usr/lib/apt/methods"
OLDMETHODS="$(readlink -f rootdir/usr/lib/apt/methods)"
-rm $NEWMETHODS
-mkdir $NEWMETHODS
-for METH in $(find $OLDMETHODS ! -type d); do
- ln -s $OLDMETHODS/$(basename $METH) $NEWMETHODS
+rm "$NEWMETHODS"
+mkdir "$NEWMETHODS"
+backupIFS="$IFS"
+IFS="$(printf "\n\b")"
+for METH in $(find "$OLDMETHODS" ! -type d); do
+ ln -s "$OLDMETHODS/$(basename "$METH")" "$NEWMETHODS"
done
-rm $NEWMETHODS/https
+IFS="$backupIFS"
+rm "$NEWMETHODS/https"
cd downloaded
testfailureequal "E: The method driver $(readlink -f './../')/rootdir/usr/lib/apt/methods/https could not be found.
@@ -56,7 +59,7 @@ testfailure test -e apt_1.0_all.deb
cd - >/dev/null
# revert to all methods
-ln -s $OLDMETHODS/https $NEWMETHODS
+ln -s "$OLDMETHODS/https" "$NEWMETHODS"
# check that downgrades from https to http are not allowed
webserverconfig 'aptwebserver::support::http' 'true'