summaryrefslogtreecommitdiff
path: root/test/integration/test-acquire-same-file-multiple-times
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-acquire-same-file-multiple-times
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-acquire-same-file-multiple-times')
-rwxr-xr-xtest/integration/test-acquire-same-file-multiple-times30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/integration/test-acquire-same-file-multiple-times b/test/integration/test-acquire-same-file-multiple-times
index a850f897c..255a71a33 100755
--- a/test/integration/test-acquire-same-file-multiple-times
+++ b/test/integration/test-acquire-same-file-multiple-times
@@ -2,19 +2,19 @@
set -e
TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
TESTFILE="$TESTDIR/framework"
-cp $TESTFILE aptarchive/foo
+cp "$TESTFILE" aptarchive/foo
APTARCHIVE="$(readlink -f ./aptarchive)"
filedown() {
msgtest 'Downloading the same URI twice over file' "$1"
- testsuccess --nomsg apthelper download-file file:///$APTARCHIVE/foo ./downloaded/foo1 '' file:///$APTARCHIVE/foo ./downloaded/foo2 '' -o Debug::pkgAcquire::Worker=1
+ testsuccess --nomsg apthelper download-file "file:///$APTARCHIVE/foo" ./downloaded/foo1 '' "file:///$APTARCHIVE/foo" ./downloaded/foo2 '' -o Debug::pkgAcquire::Worker=1
cp rootdir/tmp/testsuccess.output download.log
- testsuccess cmp $TESTFILE ./downloaded/foo1
+ testsuccess cmp "$TESTFILE" ./downloaded/foo1
testsuccess cmp ./downloaded/foo1 ./downloaded/foo2
testequal '1' grep -c '200%20URI%20Start' ./download.log
testequal '1' grep -c '201%20URI%20Done' ./download.log
@@ -23,19 +23,19 @@ filedown() {
testrun() {
$1 'no partial'
- cp $TESTFILE ./downloaded/foo1
+ cp "$TESTFILE" ./downloaded/foo1
$1 'complete partial 1'
- cp $TESTFILE ./downloaded/foo2
+ cp "$TESTFILE" ./downloaded/foo2
$1 'complete partial 2'
- cp $TESTFILE ./downloaded/foo1
- cp $TESTFILE ./downloaded/foo2
+ cp "$TESTFILE" ./downloaded/foo1
+ cp "$TESTFILE" ./downloaded/foo2
$1 'complete partial 1+2'
- dd if=$TESTFILE of=./downloaded/foo1 bs=500 count=1 2>/dev/null
+ dd if="$TESTFILE" of=./downloaded/foo1 bs=500 count=1 2>/dev/null
$1 'partial partial 1'
- dd if=$TESTFILE of=./downloaded/foo2 bs=500 count=1 2>/dev/null
+ dd if="$TESTFILE" of=./downloaded/foo2 bs=500 count=1 2>/dev/null
$1 'partial partial 2'
- dd if=$TESTFILE of=./downloaded/foo1 bs=500 count=1 2>/dev/null
- dd if=$TESTFILE of=./downloaded/foo2 bs=500 count=1 2>/dev/null
+ dd if="$TESTFILE" of=./downloaded/foo1 bs=500 count=1 2>/dev/null
+ dd if="$TESTFILE" of=./downloaded/foo2 bs=500 count=1 2>/dev/null
$1 'partial partial 1+2'
}
testrun 'filedown'
@@ -46,7 +46,7 @@ httpdown() {
msgtest 'Downloading the same URI to different files' 'twice over http'
testsuccess --nomsg apthelper download-file http://localhost:8080/foo ./downloaded/foo1 '' http://localhost:8080/foo ./downloaded/foo2 '' -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::http=1
cp rootdir/tmp/testsuccess.output download.log
- testsuccess cmp $TESTDIR/framework ./downloaded/foo1
+ testsuccess cmp "$TESTDIR/framework" ./downloaded/foo1
testsuccess cmp ./downloaded/foo1 ./downloaded/foo2
testequal '1' grep -c '200%20URI%20Start' ./download.log
testequal '1' grep -c '201%20URI%20Done' ./download.log
@@ -58,7 +58,7 @@ httpredirectdown() {
msgtest 'Redirect leads' 'first URI to the second URI'
testsuccess --nomsg apthelper download-file http://localhost:8080/foo2 ./downloaded/foo1 '' http://localhost:8080/foo ./downloaded/foo2 '' -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::http=1
cp rootdir/tmp/testsuccess.output download.log
- testsuccess cmp $TESTDIR/framework ./downloaded/foo1
+ testsuccess cmp "$TESTDIR/framework" ./downloaded/foo1
testsuccess cmp ./downloaded/foo1 ./downloaded/foo2
testequal '1' grep -c '200%20URI%20Start' ./download.log
testequal '1' grep -c '103%20Redirect' ./download.log
@@ -71,7 +71,7 @@ httpsamedown() {
msgtest 'Downloading two files via the same URI to' 'the same file'
testsuccess --nomsg apthelper download-file http://localhost:8080/foo ./downloaded/foo1 '' http://localhost:8080/foo ./downloaded/foo1 '' -o Debug::pkgAcquire::Worker=1
cp rootdir/tmp/testsuccess.output download.log
- testsuccess cmp $TESTDIR/framework ./downloaded/foo1
+ testsuccess cmp "$TESTDIR/framework" ./downloaded/foo1
testequal '1' grep -c '200%20URI%20Start' ./download.log
testequal '1' grep -c '201%20URI%20Done' ./download.log
rm -f ./downloaded/foo1