4 TESTDIR
=$(readlink -f $(dirname $0))
7 configarchitecture
'i386'
9 buildsimplenativepackage
'coolstuff' 'all' '1.0' 'unstable'
11 setupaptarchive
--no-update
14 rm -rf rootdir
/var
/lib
/apt
/lists
16 translationslisted
() {
17 msgtest
'No download of non-existent locals' "$1"
19 testsuccess
--nomsg aptget update
-o Acquire
::Languages
=en
20 testfailure
grep -q -e 'Translation-[^e][^n] ' rootdir
/tmp
/testsuccess.output
21 rm -rf rootdir
/var
/lib
/apt
/lists
23 msgtest
'Download of existent locals' "$1"
24 testsuccess
--nomsg aptget update
25 cp rootdir
/tmp
/testsuccess.output testsuccess.output
26 testsuccess
grep -q -e 'Translation-en ' testsuccess.output
27 rm -rf rootdir
/var
/lib
/apt
/lists
29 msgtest
'Download of en in LC_ALL=C' "$1"
31 testsuccess
--nomsg aptget update
32 cp rootdir
/tmp
/testsuccess.output testsuccess.output
33 testsuccess
grep -q -e 'Translation-en ' testsuccess.output
34 rm -rf rootdir
/var
/lib
/apt
/lists
37 msgtest
'Download of en as forced language' "$1"
38 testsuccess
--nomsg aptget update
-o Acquire
::Languages
=en
39 cp rootdir
/tmp
/testsuccess.output testsuccess.output
40 testsuccess
grep -q -e 'Translation-en ' testsuccess.output
41 rm -rf rootdir
/var
/lib
/apt
/lists
43 msgtest
'Download of nothing else in forced language' "$1"
44 testsuccess
--nomsg aptget update
-o Acquire
::Languages
=en
45 testfailure
grep -q -e 'Translation-[^e][^n] ' rootdir
/tmp
/testsuccess.output
46 rm -rf rootdir
/var
/lib
/apt
/lists
48 msgtest
'Download no Translation- if forced language is non-existent' "$1"
49 testsuccess
--nomsg aptget update
-o Acquire
::Languages
=ast_DE
50 testfailure
grep -q -e 'Translation-' rootdir
/tmp
/testsuccess.output
51 rm -rf rootdir
/var
/lib
/apt
/lists
53 msgtest
'Download of nothing if none is forced' "$1"
54 testsuccess
--nomsg aptget update
-o Acquire
::Languages
=none
55 testfailure
grep -q -e 'Translation' rootdir
/tmp
/testsuccess.output
56 rm -rf rootdir
/var
/lib
/apt
/lists
59 translationslisted
'with full Index'
61 # No Release file at all, so no records about Translation files
62 # (fallback to guessing)
63 find aptarchive \
( -name 'Release' -o -name 'InRelease' \
) -delete
64 configallowinsecurerepositories
"true";
66 msgtest
'Download of en as forced language' 'without Index'
67 testwarning
--nomsg aptget update
-o Acquire
::Languages
=en
68 cp rootdir
/tmp
/testsuccess.output testsuccess.output
69 testsuccess
grep -q -e 'Translation-en ' testsuccess.output
70 rm -rf rootdir
/var
/lib
/apt
/lists
72 msgtest
'Download of nothing else in forced language' 'without Index'
73 testwarning
--nomsg aptget update
-o Acquire
::Languages
=en
74 testfailure
grep -q -e 'Translation-[^e][^n] ' rootdir
/tmp
/testsuccess.output
75 rm -rf rootdir
/var
/lib
/apt
/lists
77 msgtest
'Download of ast_DE as forced language' 'without Index'
78 testwarning
--nomsg aptget update
-o Acquire
::Languages
=ast_DE
79 cp rootdir
/tmp
/testsuccess.output testsuccess.output
80 testsuccess
grep -q -e 'Translation-ast_DE$' testsuccess.output
81 rm -rf rootdir
/var
/lib
/apt
/lists
83 msgtest
'Download of nothing else in forced language' 'without Index'
84 testwarning
--nomsg aptget update
-o Acquire
::Languages
=ast_DE
85 testfailure
grep -q -e 'Translation-[^a][^s]' rootdir
/tmp
/testsuccess.output
86 rm -rf rootdir
/var
/lib
/apt
/lists
88 msgtest
'Download of nothing if none is forced' 'without Index'
89 testwarning
--nomsg aptget update
-o Acquire
::Languages
=none
90 testfailure
grep -q -e 'Translation' rootdir
/tmp
/testsuccess.output
91 rm -rf rootdir
/var
/lib
/apt
/lists
93 mkdir -p rootdir
/var
/lib
/apt
/lists
94 touch rootdir
/var
/lib
/apt
/lists
/localhost
:8080_dists_unstable_main_i18n_Translation
-ast_DE
96 msgtest
'Download of builtin files' 'without Index'
97 testwarning
--nomsg aptget update
98 cp rootdir
/tmp
/testsuccess.output testsuccess.output
99 testsuccess
grep -q -e 'Translation-ast_DE' testsuccess.output
100 rm -rf rootdir
/var
/lib
/apt
/lists
102 mkdir -p rootdir
/var
/lib
/apt
/lists
103 touch rootdir
/var
/lib
/apt
/lists
/localhost
:8080_dists_unstable_main_i18n_Translation
-ast_DE
105 msgtest
'Download of nothing (even builtin) if none is forced' 'without Index'
106 testwarning
--nomsg aptget update
-o Acquire
::Languages
=none
107 testfailure
grep -q -e 'Translation' rootdir
/tmp
/testsuccess.output
108 rm -rf rootdir
/var
/lib
/apt
/lists