]> git.saurik.com Git - apt.git/blame - test/integration/test-bug-737130-multicompress-file-modes
update test
[apt.git] / test / integration / test-bug-737130-multicompress-file-modes
CommitLineData
cc130d71
CW
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6setupenvironment
7configarchitecture 'i386'
8
9cat >aptarchive/ftparchive.conf <<EOF
10Dir { ArchiveDir "$(pwd)/aptarchive"; CacheDir "$(pwd)/aptarchive"; };
11Default { Translation::Compress ". gzip bzip2 xz"; FileMode 0644; };
12tree "dists/sid" {
13 Sections "main";
14 Architectures "i386";
15 LongDescription "false";
16};
17EOF
18mkdir -p aptarchive/dists/sid/main/binary-i386
19mkdir -p aptarchive/dists/sid/main/i18n
20testsuccess aptftparchive generate aptarchive/ftparchive.conf
21i18n=aptarchive/dists/sid/main/i18n
22for comp in '' .gz .bz2 .xz; do
23 msgtest 'Test apt-ftparchive file mode is 644 for' "Translation-en$comp"
24 FILEMODE="$(stat --format %a "$i18n/Translation-en$comp")"
25 if [ "$FILEMODE" != '644' ]; then
26 msgfail "Mode was '$FILEMODE'!"
27 else
28 msgpass
29 fi
30done