diff options
Diffstat (limited to 'test/libapt')
-rw-r--r-- | test/libapt/getlanguages_test.cc | 24 | ||||
-rwxr-xr-x | test/libapt/run-tests | 2 |
2 files changed, 25 insertions, 1 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"; diff --git a/test/libapt/run-tests b/test/libapt/run-tests index 0f55f7386..f5fc03446 100755 --- a/test/libapt/run-tests +++ b/test/libapt/run-tests @@ -4,7 +4,7 @@ set -e local DIR=$(readlink -f $(dirname $0)) echo "Compiling the tests …" test -d "$DIR/../../build/obj/test/libapt/" || mkdir -p "$DIR/../../build/obj/test/libapt/" -$(cd $DIR && make) +(cd $DIR && make) echo "Running all testcases …" LDPATH="$DIR/../../build/bin" EXT="_libapt_test" |