summaryrefslogtreecommitdiffstats
path: root/test/integration/test-bug-737130-multicompress-file-modes
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-bug-737130-multicompress-file-modes
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-bug-737130-multicompress-file-modes')
-rwxr-xr-xtest/integration/test-bug-737130-multicompress-file-modes30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/integration/test-bug-737130-multicompress-file-modes b/test/integration/test-bug-737130-multicompress-file-modes
new file mode 100755
index 0000000..2ae5166
--- /dev/null
+++ b/test/integration/test-bug-737130-multicompress-file-modes
@@ -0,0 +1,30 @@
+#!/bin/sh
+set -e
+
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
+setupenvironment
+configarchitecture 'i386'
+
+cat >aptarchive/ftparchive.conf <<EOF
+Dir { ArchiveDir "$(pwd)/aptarchive"; CacheDir "$(pwd)/aptarchive"; };
+Default { Translation::Compress ". gzip bzip2 xz"; FileMode 0644; };
+tree "dists/sid" {
+ Sections "main";
+ Architectures "i386";
+ LongDescription "false";
+};
+EOF
+mkdir -p aptarchive/dists/sid/main/binary-i386
+mkdir -p aptarchive/dists/sid/main/i18n
+testsuccess aptftparchive generate aptarchive/ftparchive.conf
+i18n=aptarchive/dists/sid/main/i18n
+for comp in '' .gz .bz2 .xz; do
+ msgtest 'Test apt-ftparchive file mode is 644 for' "Translation-en$comp"
+ FILEMODE="$(stat --format %a "$i18n/Translation-en$comp")"
+ if [ "$FILEMODE" != '644' ]; then
+ msgfail "Mode was '$FILEMODE'!"
+ else
+ msgpass
+ fi
+done