summaryrefslogtreecommitdiffstats
path: root/test/integration/test-uri-encode-filename-field
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:00:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:00:48 +0000
commit851b6a097165af4d51c0db01b5e05256e5006896 (patch)
tree5f7c388ec894a7806c49a99f3bdb605d0b299a7c /test/integration/test-uri-encode-filename-field
parentInitial commit. (diff)
downloadapt-851b6a097165af4d51c0db01b5e05256e5006896.tar.xz
apt-851b6a097165af4d51c0db01b5e05256e5006896.zip
Adding upstream version 2.6.1.upstream/2.6.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/integration/test-uri-encode-filename-field')
-rwxr-xr-xtest/integration/test-uri-encode-filename-field47
1 files changed, 47 insertions, 0 deletions
diff --git a/test/integration/test-uri-encode-filename-field b/test/integration/test-uri-encode-filename-field
new file mode 100755
index 0000000..233332d
--- /dev/null
+++ b/test/integration/test-uri-encode-filename-field
@@ -0,0 +1,47 @@
+#!/bin/sh
+set -e
+
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
+setupenvironment
+configarchitecture 'amd64'
+
+buildsimplenativepackage 'foo' 'all' '0+0~0'
+setupaptarchive --no-update
+
+runtest() {
+ rm -rf rootdir/var/lib/apt/lists
+ testsuccess apt update
+
+ cd downloaded
+ testsuccess apt download foo
+ testsuccess rm 'foo_0+0~0_all.deb'
+ testsuccess apt install foo
+ testsuccess apt source foo
+ testsuccess rm 'foo_0+0~0.dsc' 'foo_0+0~0.tar.xz'
+ testsuccess rm -r 'foo-0+0~0'
+
+ mv '../aptarchive/pool/foo_0+0~0_all.deb' '../aptarchive/pool/foo_0%3a0+0~0_all.deb'
+ mv '../aptarchive/pool/foo_0+0~0.dsc' '../aptarchive/pool/foo_0%3a0+0~0.dsc'
+ testsuccess apt purge foo -y
+ testfailure apt download foo
+ testfailure apt install foo
+ testfailure apt source foo --dsc-only
+
+ sed -i -e 's#_0+0~0_#_0%3a0+0~0_#' ../rootdir/var/lib/apt/lists/*Packages
+ sed -i -e 's#_0+0~0.d#_0%3a0+0~0.d#' ../rootdir/var/lib/apt/lists/*Sources
+ testsuccess apt download foo
+ testsuccess rm 'foo_0+0~0_all.deb'
+ testsuccess apt install foo
+ testsuccess apt source foo
+ testsuccess rm 'foo_0%3a0+0~0.dsc' 'foo_0+0~0.tar.xz'
+ testsuccess rm -r 'foo-0+0~0'
+
+ cd "$TMPWORKINGDIRECTORY" >/dev/null
+ mv 'aptarchive/pool/foo_0%3a0+0~0_all.deb' 'aptarchive/pool/foo_0+0~0_all.deb'
+ mv 'aptarchive/pool/foo_0%3a0+0~0.dsc' 'aptarchive/pool/foo_0+0~0.dsc'
+}
+
+runtest 'file'
+changetowebserver
+runtest 'http'