summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-11-09 14:18:19 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-11-09 14:18:19 +0100
commiteb3947c6510042c054a319d8053821faf7244dea (patch)
tree5cb731f5fd048016edae2489168ac4413e13ab94 /test
parent543b0abfa5466274f5dcbe943b63633189acd887 (diff)
evaluate Acquire::Languages= before LANG= (Closes: #602573)
Diffstat (limited to 'test')
-rw-r--r--test/libapt/getlanguages_test.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/libapt/getlanguages_test.cc b/test/libapt/getlanguages_test.cc
index 14f1af185..3559aae0c 100644
--- a/test/libapt/getlanguages_test.cc
+++ b/test/libapt/getlanguages_test.cc
@@ -89,6 +89,24 @@ int main(int argc,char *argv[])
env[0] = "C";
vec = APT::Configuration::getLanguages(false, false, env);
equals(vec.size(), 0);
+
+ _config->Set("Acquire::Languages", "environment");
+ env[0] = "C";
+ vec = APT::Configuration::getLanguages(false, false, env);
+ equals(vec.size(), 1);
+ equals(vec[0], "en");
+
+ _config->Set("Acquire::Languages", "de");
+ env[0] = "C";
+ vec = APT::Configuration::getLanguages(false, false, env);
+ equals(vec.size(), 1);
+ equals(vec[0], "de");
+
+ _config->Set("Acquire::Languages", "fr");
+ env[0] = "ast_DE.UTF-8";
+ vec = APT::Configuration::getLanguages(false, false, env);
+ equals(vec.size(), 1);
+ equals(vec[0], "fr");
_config->Set("Acquire::Languages", "");
_config->Set("Acquire::Languages::1", "environment");