]>
git.saurik.com Git - apt.git/blob - test/integration/test-sourceslist-lang-plusminus-options
4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
7 configarchitecture 'amd64'
10 msgtest 'Test acquired languages for' "$1"
14 aptget indextargets --no-release-info 'Identifier: Translations' "$@
" --format '$(LANGUAGE)' | sort -u > gotlangs.list
15 if [ -z "$LANGS" ]; then
16 echo -n | tr ',' '\n' | sort | checkdiff - gotlangs.list && msgpass || msgfail
18 echo -n "$LANGS" | tr ',' '\n' | sort | checkdiff - gotlangs.list && msgpass || msgfail
21 echo 'deb http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
22 testlangs 'default' 'en'
24 echo 'Acquire::Languages "environment
,en
";' > rootdir/etc/apt/apt.conf.d/langs.conf
25 testlangs 'default config' 'en'
27 echo 'Acquire::Languages "en
,en
,en
";' > rootdir/etc/apt/apt.conf.d/langs.conf
28 testlangs 'duplicated config' 'en'
30 echo 'Acquire::Languages "none
";' > rootdir/etc/apt/apt.conf.d/langs.conf
31 testlangs 'none config' ''
33 echo 'Acquire::Languages "en
,none
,de
,de_DE
";' > rootdir/etc/apt/apt.conf.d/langs.conf
34 testlangs 'english + german config' 'en,de,de_DE'
36 echo 'deb [lang=pt] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
37 testlangs 'lang=pt' 'pt'
39 echo 'deb [lang=en] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
40 testlangs 'lang=en' 'en'
42 echo 'deb [lang=de_DE] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
43 testlangs 'lang=de_DE' 'de_DE'
45 echo 'deb [lang=none] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
46 testlangs 'lang=none' ''
48 all' aptget indextargets --no-release-info 'Identifier: Packages' --format '$(ARCHITECTURE)'
50 echo 'deb [lang+=pt] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
51 testlangs 'lang+=pt' 'en,de,de_DE,pt'
53 echo 'deb [lang+=en] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
54 testlangs 'lang+=en' 'en,de,de_DE'
56 echo 'deb [lang+=de_DE] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
57 testlangs 'lang+=de_DE' 'en,de,de_DE'
59 echo 'deb [lang-=pt] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
60 testlangs 'lang-=pt' 'en,de,de_DE'
62 echo 'deb [lang-=en] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
63 testlangs 'lang-=en' 'de,de_DE'
65 echo 'deb [lang-=de_DE] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
66 testlangs 'lang-=de_DE' 'en,de'
68 echo 'deb http://example.org/debian stable rocks
69 deb http://example.org/debian stable solid' > rootdir/etc/apt/sources.list
70 testlangs 'english + german config multicomponent' 'en,de,de_DE'
72 echo 'deb http://example.org/debian stable rocks
73 deb [lang=pt] http://example.org/debian stable solid' > rootdir/etc/apt/sources.list
74 testlangs 'multicomponent one lang= combined' 'en,de,de_DE,pt'
75 testlangs 'multicomponent one lang= rocks' 'en,de,de_DE' 'Component: rocks'
76 testlangs 'multicomponent one lang= solid' 'pt' 'Component: solid'
78 echo 'deb [lang=pt] http://example.org/debian stable rocks
79 deb [lang=de] http://example.org/debian stable solid' > rootdir/etc/apt/sources.list
80 testlangs 'multicomponent different lang= combined' 'de,pt'
81 testlangs 'multicomponent different lang= rocks' 'pt' 'Component: rocks'
82 testlangs 'multicomponent different lang= solid' 'de' 'Component: solid'
84 echo 'deb [lang+=pt] http://example.org/debian stable rocks
85 deb [lang-=de] http://example.org/debian stable solid' > rootdir/etc/apt/sources.list
86 testlangs 'multicomponent different lang+-= combined' 'en,de,de_DE,pt'
87 testlangs 'multicomponent different lang+-= rocks' 'en,de,de_DE,pt' 'Component: rocks'
88 testlangs 'multicomponent different lang+-= solid' 'en,de_DE' 'Component: solid'