summaryrefslogtreecommitdiff
path: root/test/libapt/getlanguages_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/libapt/getlanguages_test.cc')
-rw-r--r--test/libapt/getlanguages_test.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/test/libapt/getlanguages_test.cc b/test/libapt/getlanguages_test.cc
index 3d63e0e74..a1c801ea2 100644
--- a/test/libapt/getlanguages_test.cc
+++ b/test/libapt/getlanguages_test.cc
@@ -7,13 +7,6 @@
#include <iostream>
-// simple helper to quickly output a vector of strings
-void dumpVector(std::vector<std::string> vec) {
- for (std::vector<std::string>::const_iterator v = vec.begin();
- v != vec.end(); v++)
- std::cout << *v << std::endl;
-}
-
int main(int argc,char *argv[])
{
if (argc != 2) {
@@ -133,13 +126,19 @@ int main(int argc,char *argv[])
_config->Set("Dir::State::lists", argv[1]);
vec = APT::Configuration::getLanguages(true, false, env);
- equals(vec.size(), 6);
+ equals(vec.size(), 7);
equals(vec[0], "de_DE");
equals(vec[1], "de");
equals(vec[2], "en");
equals(vec[3], "none");
- equalsOr2(vec[4], "pt", "tr");
- equalsOr2(vec[5], "tr", "pt");
+ equalsOr3(vec[4], "pt", "tr", "ast_DE");
+ equalsOr3(vec[5], "tr", "pt", "ast_DE");
+ equalsOr3(vec[6], "tr", "pt", "ast_DE");
+
+ _config->Set("Acquire::Languages", "none");
+ vec = APT::Configuration::getLanguages(true, false, env);
+ equals(vec.size(), 0);
+ _config->Set("Acquire::Languages", "");
_config->Set("Dir::State::lists", "/non-existing-dir");
_config->Set("Acquire::Languages::1", "none");