diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-11-18 09:51:50 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-11-18 09:51:50 +0100 |
commit | ee7077b0133711c879312f74303e8486a2bb865d (patch) | |
tree | 1c9c74017fe14c9f92abade0a3b679e01e6c53c1 /test/libapt/getlanguages_test.cc | |
parent | 19a9616d1c19c4a053826585f969459d166e44f2 (diff) | |
parent | 5c246b99204e8ef32243ae42c5ca3a2dee54e59b (diff) |
merged from debian-sid
Diffstat (limited to 'test/libapt/getlanguages_test.cc')
-rw-r--r-- | test/libapt/getlanguages_test.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/libapt/getlanguages_test.cc b/test/libapt/getlanguages_test.cc index 9a8910b58..3559aae0c 100644 --- a/test/libapt/getlanguages_test.cc +++ b/test/libapt/getlanguages_test.cc @@ -85,6 +85,30 @@ int main(int argc,char *argv[]) equals(vec.size(), 1); equals(vec[0], "en"); + _config->Set("Acquire::Languages", "none"); + 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"); _config->Set("Acquire::Languages::2", "en"); env[0] = "de_DE.UTF-8"; |