summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-bug-632221-cross-dependency-satisfaction22
-rwxr-xr-xtest/integration/test-ignore-provides-if-versioned-breaks10
-rwxr-xr-xtest/integration/test-ignore-provides-if-versioned-conflicts10
-rwxr-xr-xtest/integration/test-sourceslist-lang-plusminus-options87
4 files changed, 108 insertions, 21 deletions
diff --git a/test/integration/test-bug-632221-cross-dependency-satisfaction b/test/integration/test-bug-632221-cross-dependency-satisfaction
index 563821173..12704e5de 100755
--- a/test/integration/test-bug-632221-cross-dependency-satisfaction
+++ b/test/integration/test-bug-632221-cross-dependency-satisfaction
@@ -167,17 +167,17 @@ Conf libfwibble-dev (1.0 unstable [armel])' aptget build-dep apt -s
testsuccessequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
- amdboot:amd64 cool doxygen foreigner libc6:amd64 libc6 libc6-dev:amd64
- libc6-dev libfwibble-dev:amd64 libfwibble1:amd64 linux-stuff:amd64
+ amdboot:amd64 cool doxygen foreigner libc6 libc6:amd64 libc6-dev
+ libc6-dev:amd64 libfwibble-dev:amd64 libfwibble1:amd64 linux-stuff:amd64
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Inst amdboot:amd64 (1.0 unstable [amd64])
Inst cool (1.0 unstable [armel])
Inst doxygen (1.0 unstable [armel])
Inst foreigner (1.0 unstable [armel])
-Inst libc6:amd64 (1.0 unstable [amd64])
Inst libc6 (1.0 unstable [armel])
-Inst libc6-dev:amd64 (1.0 unstable [amd64])
+Inst libc6:amd64 (1.0 unstable [amd64])
Inst libc6-dev (1.0 unstable [armel])
+Inst libc6-dev:amd64 (1.0 unstable [amd64])
Inst libfwibble1:amd64 (1.0 unstable [amd64])
Inst libfwibble-dev:amd64 (1.0 unstable [amd64])
Inst linux-stuff:amd64 (1.0 unstable [amd64])
@@ -185,10 +185,10 @@ Conf amdboot:amd64 (1.0 unstable [amd64])
Conf cool (1.0 unstable [armel])
Conf doxygen (1.0 unstable [armel])
Conf foreigner (1.0 unstable [armel])
-Conf libc6:amd64 (1.0 unstable [amd64])
Conf libc6 (1.0 unstable [armel])
-Conf libc6-dev:amd64 (1.0 unstable [amd64])
+Conf libc6:amd64 (1.0 unstable [amd64])
Conf libc6-dev (1.0 unstable [armel])
+Conf libc6-dev:amd64 (1.0 unstable [amd64])
Conf libfwibble1:amd64 (1.0 unstable [amd64])
Conf libfwibble-dev:amd64 (1.0 unstable [amd64])
Conf linux-stuff:amd64 (1.0 unstable [amd64])' aptget build-dep apt -s -a amd64
@@ -275,24 +275,24 @@ Conf libfwibble-dev (1.0 unstable [armel])' aptget build-dep apt -s
testsuccessequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
- amdboot:amd64 doxygen libc6:amd64 libc6 libc6-dev:amd64 libc6-dev
+ amdboot:amd64 doxygen libc6 libc6:amd64 libc6-dev libc6-dev:amd64
libfwibble-dev:amd64 libfwibble1:amd64 linux-stuff:amd64
0 upgraded, 9 newly installed, 0 to remove and 2 not upgraded.
Inst amdboot:amd64 (1.0 unstable [amd64])
Inst doxygen (1.0 unstable [armel])
-Inst libc6:amd64 (1.0 unstable [amd64])
Inst libc6 (1.0 unstable [armel])
-Inst libc6-dev:amd64 (1.0 unstable [amd64])
+Inst libc6:amd64 (1.0 unstable [amd64])
Inst libc6-dev (1.0 unstable [armel])
+Inst libc6-dev:amd64 (1.0 unstable [amd64])
Inst libfwibble1:amd64 (1.0 unstable [amd64])
Inst libfwibble-dev:amd64 (1.0 unstable [amd64])
Inst linux-stuff:amd64 (1.0 unstable [amd64])
Conf amdboot:amd64 (1.0 unstable [amd64])
Conf doxygen (1.0 unstable [armel])
-Conf libc6:amd64 (1.0 unstable [amd64])
Conf libc6 (1.0 unstable [armel])
-Conf libc6-dev:amd64 (1.0 unstable [amd64])
+Conf libc6:amd64 (1.0 unstable [amd64])
Conf libc6-dev (1.0 unstable [armel])
+Conf libc6-dev:amd64 (1.0 unstable [amd64])
Conf libfwibble1:amd64 (1.0 unstable [amd64])
Conf libfwibble-dev:amd64 (1.0 unstable [amd64])
Conf linux-stuff:amd64 (1.0 unstable [amd64])' aptget build-dep apt -s -a amd64
diff --git a/test/integration/test-ignore-provides-if-versioned-breaks b/test/integration/test-ignore-provides-if-versioned-breaks
index 20424b942..4d6114637 100755
--- a/test/integration/test-ignore-provides-if-versioned-breaks
+++ b/test/integration/test-ignore-provides-if-versioned-breaks
@@ -134,17 +134,17 @@ Conf foo-same-provider (1.0 unstable [i386])' aptget install foo-same-provider f
testsuccessequal 'Reading package lists...
Building dependency tree...
The following extra packages will be installed:
- foo-same:amd64 foo-same
+ foo-same foo-same:amd64
The following NEW packages will be installed:
foo-same-breaker-3 foo-same-provider
The following packages will be upgraded:
- foo-same:amd64 foo-same
+ foo-same foo-same:amd64
2 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
-Inst foo-same:amd64 [2.0] (4.0 unstable [amd64]) [foo-same:amd64 on foo-same:i386] [foo-same:i386 on foo-same:amd64] [foo-same:i386 ]
-Inst foo-same [2.0] (4.0 unstable [i386])
+Inst foo-same [2.0] (4.0 unstable [i386]) [foo-same:i386 on foo-same:amd64] [foo-same:amd64 on foo-same:i386] [foo-same:amd64 ]
+Inst foo-same:amd64 [2.0] (4.0 unstable [amd64])
Inst foo-same-breaker-3 (1.0 unstable [i386])
Inst foo-same-provider (1.0 unstable [i386])
-Conf foo-same (4.0 unstable [i386])
Conf foo-same:amd64 (4.0 unstable [amd64])
+Conf foo-same (4.0 unstable [i386])
Conf foo-same-breaker-3 (1.0 unstable [i386])
Conf foo-same-provider (1.0 unstable [i386])' aptget install foo-same-provider foo-same-breaker-3 -s
diff --git a/test/integration/test-ignore-provides-if-versioned-conflicts b/test/integration/test-ignore-provides-if-versioned-conflicts
index a781d8e44..6a0c924e2 100755
--- a/test/integration/test-ignore-provides-if-versioned-conflicts
+++ b/test/integration/test-ignore-provides-if-versioned-conflicts
@@ -134,17 +134,17 @@ Conf foo-same-provider (1.0 unstable [i386])' aptget install foo-same-provider f
testsuccessequal 'Reading package lists...
Building dependency tree...
The following extra packages will be installed:
- foo-same:amd64 foo-same
+ foo-same foo-same:amd64
The following NEW packages will be installed:
foo-same-breaker-3 foo-same-provider
The following packages will be upgraded:
- foo-same:amd64 foo-same
+ foo-same foo-same:amd64
2 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
-Inst foo-same:amd64 [2.0] (4.0 unstable [amd64]) [foo-same:amd64 on foo-same:i386] [foo-same:i386 on foo-same:amd64] [foo-same:i386 ]
-Inst foo-same [2.0] (4.0 unstable [i386])
+Inst foo-same [2.0] (4.0 unstable [i386]) [foo-same:i386 on foo-same:amd64] [foo-same:amd64 on foo-same:i386] [foo-same:amd64 ]
+Inst foo-same:amd64 [2.0] (4.0 unstable [amd64])
Inst foo-same-breaker-3 (1.0 unstable [i386])
Inst foo-same-provider (1.0 unstable [i386])
-Conf foo-same (4.0 unstable [i386])
Conf foo-same:amd64 (4.0 unstable [amd64])
+Conf foo-same (4.0 unstable [i386])
Conf foo-same-breaker-3 (1.0 unstable [i386])
Conf foo-same-provider (1.0 unstable [i386])' aptget install foo-same-provider foo-same-breaker-3 -s
diff --git a/test/integration/test-sourceslist-lang-plusminus-options b/test/integration/test-sourceslist-lang-plusminus-options
new file mode 100755
index 000000000..28d5f9e06
--- /dev/null
+++ b/test/integration/test-sourceslist-lang-plusminus-options
@@ -0,0 +1,87 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'native'
+
+testlangs() {
+ msgtest 'Test acquired languages for' "$1"
+ local LANGS="$2"
+ shift 2
+ rm -f gotlangs.list
+ aptget files --no-release-info 'Created-By: Translations' "$@" --format '$(LANGUAGE)' | sort -u > gotlangs.list
+ if [ -z "$LANGS" ]; then
+ echo -n | tr ',' '\n' | sort | checkdiff - gotlangs.list && msgpass || msgfail
+ else
+ echo -n "$LANGS" | tr ',' '\n' | sort | checkdiff - gotlangs.list && msgpass || msgfail
+ fi
+}
+echo 'deb http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testlangs 'default' 'en'
+
+echo 'Acquire::Languages "environment,en";' > rootdir/etc/apt/apt.conf.d/langs.conf
+testlangs 'default config' 'en'
+
+echo 'Acquire::Languages "en,en,en";' > rootdir/etc/apt/apt.conf.d/langs.conf
+testlangs 'duplicated config' 'en'
+
+echo 'Acquire::Languages "none";' > rootdir/etc/apt/apt.conf.d/langs.conf
+testlangs 'none config' ''
+
+echo 'Acquire::Languages "en,none,de,de_DE";' > rootdir/etc/apt/apt.conf.d/langs.conf
+testlangs 'english + german config' 'en,de,de_DE'
+
+echo 'deb [lang=pt] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testlangs 'lang=pt' 'pt'
+
+echo 'deb [lang=en] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testlangs 'lang=en' 'en'
+
+echo 'deb [lang=de_DE] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testlangs 'lang=de_DE' 'de_DE'
+
+echo 'deb [lang=none] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testlangs 'lang=none' ''
+testequal 'amd64' aptget files --no-release-info 'Created-By: Packages' --format '$(ARCHITECTURE)'
+
+echo 'deb [lang+=pt] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testlangs 'lang+=pt' 'en,de,de_DE,pt'
+
+echo 'deb [lang+=en] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testlangs 'lang+=en' 'en,de,de_DE'
+
+echo 'deb [lang+=de_DE] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testlangs 'lang+=de_DE' 'en,de,de_DE'
+
+echo 'deb [lang-=pt] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testlangs 'lang-=pt' 'en,de,de_DE'
+
+echo 'deb [lang-=en] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testlangs 'lang-=en' 'de,de_DE'
+
+echo 'deb [lang-=de_DE] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testlangs 'lang-=de_DE' 'en,de'
+
+echo 'deb http://example.org/debian stable rocks
+deb http://example.org/debian stable solid' > rootdir/etc/apt/sources.list
+testlangs 'english + german config multicomponent' 'en,de,de_DE'
+
+echo 'deb http://example.org/debian stable rocks
+deb [lang=pt] http://example.org/debian stable solid' > rootdir/etc/apt/sources.list
+testlangs 'multicomponent one lang= combined' 'en,de,de_DE,pt'
+testlangs 'multicomponent one lang= rocks' 'en,de,de_DE' 'Component: rocks'
+testlangs 'multicomponent one lang= solid' 'pt' 'Component: solid'
+
+echo 'deb [lang=pt] http://example.org/debian stable rocks
+deb [lang=de] http://example.org/debian stable solid' > rootdir/etc/apt/sources.list
+testlangs 'multicomponent different lang= combined' 'de,pt'
+testlangs 'multicomponent different lang= rocks' 'pt' 'Component: rocks'
+testlangs 'multicomponent different lang= solid' 'de' 'Component: solid'
+
+echo 'deb [lang+=pt] http://example.org/debian stable rocks
+deb [lang-=de] http://example.org/debian stable solid' > rootdir/etc/apt/sources.list
+testlangs 'multicomponent different lang+-= combined' 'en,de,de_DE,pt'
+testlangs 'multicomponent different lang+-= rocks' 'en,de,de_DE,pt' 'Component: rocks'
+testlangs 'multicomponent different lang+-= solid' 'en,de_DE' 'Component: solid'