summaryrefslogtreecommitdiff
path: root/test/libapt/getlanguages_test.cc
Commit message (Collapse)AuthorAgeFilesLines
* Prevent GTest from flooding us with compiler warningsDavid Kalnischkies2018-05-041-22/+22
| | | | | | | | | | | | | | GTest has a bunch of undefined macros which causes the compiler to spit out warnings for each one on each test file. There isn't much we can do, so we just disable the warning for the testcases. Other warnings like sign-promo and sign-compare we can avoid by being more explicit about our expected integer constants being unsigned. As we are just changing testcases, there is no user visible change which would deserve to be noted in the changelog. Gbp-Dch: Ignore Reported-By: gcc-8
* Reformat and sort all includes with clang-formatJulian Andres Klode2017-07-121-2/+2
| | | | | | | | | | | | | This makes it easier to see which headers includes what. The changes were done by running git grep -l '#\s*include' \ | grep -E '.(cc|h)$' \ | xargs sed -i -E 's/(^\s*)#(\s*)include/\1#\2 include/' To modify all include lines by adding a space, and then running ./git-clang-format.sh.
* warn if clearsigned file has ignored content partsDavid Kalnischkies2016-12-311-0/+7
| | | | | | | | | | | | | Clearsigned files like InRelease, .dsc, .changes and co can potentially include unsigned or additional messages blocks ignored by gpg in verification, but a potential source of trouble in our own parsing attempts – and an unneeded risk as the usecases for the clearsigned files we deal with do not reasonably include unsigned parts (like emails or some such). This commit changes the silent ignoring to warnings for now to get an impression on how widespread unintended unsigned parts are, but eventually we want to turn these into hard errors.
* use Google C++ Testing Framework for libapt testsDavid Kalnischkies2014-04-161-189/+223
| | | | | | | | | | | | My commit 45df0ad2 from 26. Nov 2009 had a little remark: "The commit also includes a very very simple testapp." This was never intended to be permanent, but as usually… The commit adds the needed make magic to compile gtest statically as it is required and links it against a small runner. All previous testcase binaries are reimplemented in gtest and combined in this runner. While most code is a 1:1 translation some had to be rewritten like compareversion_test.cc, but the coverage remains the same.
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-0/+2
| | | | | | | | Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use)
* add default and override handling for Cnf::FindVectorDavid Kalnischkies2014-03-131-0/+8
| | | | | | Automatically handle the override of list options via its parent value which can even be a comma-separated list of values. It also adds an easy way of providing a default for the list.
* * apt-pkg/aptconfiguration.cc:David Kalnischkies2012-06-101-2/+4
| | | | - if APT::Languages=none save "none" in allCodes so that the detected configuration is cached as intended (Closes: #674690, LP: #1004947)
* * apt-pkg/aptconfiguration.cc:David Kalnischkies2012-05-201-4/+11
| | | | - longcode Translation files are saved with encoded underscore, so make sure to pick these files up as well for Acquire::Languages
* cherrypick from my apt/experimental branchDavid Kalnischkies2011-10-051-3/+9
| | | | | | * apt-pkg/deb/debmetaindex.cc: - none is a separator, not a language: no need for Index (Closes: #624218) * apt-pkg/aptconfiguration.cc: - do not builtin languages only if none is forced (Closes: #643787)
* cppcheck complains about some possible speed improvements which could beDavid Kalnischkies2011-08-111-7/+0
| | | | | | done on the mirco-optimazation level, so lets fix them: (performance) Possible inefficient checking for emptiness. (performance) Prefer prefix ++/-- operators for non-primitive types.
* the order of languages after "none" is not important, so ignore it in testsDavid Kalnischkies2011-07-251-2/+2
|
* - download and use i18n/Index to choose which Translations to downloadDavid Kalnischkies2011-01-281-31/+40
| | | | * apt-pkg/aptconfiguration.cc: - remove the inbuilt Translation files whitelist
* evaluate Acquire::Languages= before LANG= (Closes: #602573)David Kalnischkies2010-11-091-0/+18
|
* * apt-pkg/aptconfiguration.cc:David Kalnischkies2010-11-061-0/+6
| | | - respect the none-force even in LANG=C (Closes: #602573)
* merge from the mvo branchMichael Vogt2010-05-041-0/+7
|
* * aptconfiguration.cc:David Kalnischkies2010-02-181-2/+20
| | | | | | | | | | - include all existing Translation files in the Cache (Closes: 564137) Previously if APT was executed with a different LC_* all these invocations needed to rebuild the Cache as too many files were included or missing: Now the lists-directory is checked for Translation-files and all these will be included in getLanguages() regardless of the environment setting (after a "none" so APT will not use them for displaying information).
* dd support for the LANGUAGE environment variableDavid Kalnischkies2010-02-181-14/+47
|
* convert getlanguages_test to our new equals()David Kalnischkies2009-11-281-34/+34
|
* [BREAK] add possibility to download and use multiplyDavid Kalnischkies2009-11-261-0/+91
Translation files, configurable with Acquire::Languages accessable with APT::Configuration::getLanguages() and as always with documentation in apt.conf. The commit also includes a very very simple testapp.