summaryrefslogtreecommitdiff
path: root/test/libapt/sourcelist_test.cc
Commit message (Collapse)AuthorAgeFilesLines
* Modernize standard library includesJulian Andres Klode2024-02-201-2/+2
| | | | | | This was automated with sed and git-clang-format, and then I had to fix up the top of policy.cc by hand as git-clang-format accidentally indented it by two spaces.
* Allow prefix to be a complete filename for GetTempFileDavid Kalnischkies2020-05-181-8/+2
| | | | | | | | | | | | | Our testcases had their own implementation of GetTempFile with the feature of a temporary file with a choosen suffix. Merging this into GetTempFile lets us drop this duplicate and hence test more our code rather than testing our helpers for test implementation. And then hashsums_test had another implementation… and extracttar wasn't even trying to use a real tempfile… one GetTempFile to rule them all! That also ensures that these tempfiles are created in a temporary directory rather than the current directory which is a nice touch and tries a little harder to clean up those tempfiles.
* Prevent GTest from flooding us with compiler warningsDavid Kalnischkies2018-05-041-1/+1
| | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | 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.
* bring back deb822 sources.list entries as .sourcesDavid Kalnischkies2015-08-101-10/+5
| | | | | | | | | | | | | | | | | | Having two different formats in the same file is very dirty and causes external tools to fail hard trying to parse them. It is probably not a good idea for them to parse them in the first place, but they do and we shouldn't break them if there is a better way. So we solve this issue for now by giving our deb822 format a new filename extension ".sources" which unsupporting applications are likely to ignore an can begin gradually moving forward rather than waiting for the unknown applications to catch up. Currently and for the forseeable future apt is going to support both with the same feature set as documented in the manpage, with the longtime plan of adopting the 'new' format as default, but that is a long way to go and might get going more from having an easier time setting options than from us pushing it explicitely.
* fix memory leaks reported by -fsanitizeDavid Kalnischkies2015-08-101-2/+3
| | | | | | | | Various small leaks here and there. Nothing particularily big, but still good to fix. Found by the sanitizers while running our testcases. Reported-By: gcc -fsanitize Git-Dch: Ignore
* tests: silence clang on uninitilized variablesDavid Kalnischkies2014-11-081-1/+1
| | | | | | | | The testcases have far worse problems if these ever end up being NULL and/or are not given a value by the method called, but clang is right to warn about it, just that we don't want to fix it in testcases… Git-Dch: Ignore
* use Google C++ Testing Framework for libapt testsDavid Kalnischkies2014-04-161-33/+16
| | | | | | | | | | | | 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-2/+7
| | | | | | | | 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)
* warning: unused parameter ‘foo’ [-Wunused-parameter]David Kalnischkies2014-03-131-1/+1
| | | | | Reported-By: gcc -Wunused-parameter Git-Dch: Ignore
* warning: no previous declaration for foobar() [-Wmissing-declarations]David Kalnischkies2014-03-131-1/+1
| | | | | Git-Dch: Ignore Reported-By: gcc -Wmissing-declarations
* fix testMichael Vogt2014-01-241-0/+2
|
* Merge remote-tracking branch 'upstream/debian/experimental-no-abi-break' ↵Michael Vogt2014-01-211-0/+1
|\ | | | | | | | | | | | | into feature/source-deb822 Conflicts: test/integration/test-apt-sources-deb822
| * Merge remote-tracking branch 'mvo/feature/source-deb822' into ↵Michael Vogt2014-01-181-2/+2
| |\ | | | | | | | | | debian/experimental-no-abi-break
| * \ Merge remote-tracking branch 'mvo/feature/source-deb822' into ↵Michael Vogt2014-01-181-2/+2
| |\ \ | | | | | | | | | | | | debian/experimental-no-abi-break
| * \ \ merged mvo/feature/deb822Michael Vogt2014-01-161-4/+4
| |\ \ \
| * | | | actually register the tempfile removal atexitDavid Kalnischkies2014-01-151-0/+1
| | | | | | | | | | | | | | | | | | | | Git-Dch: Ignore
* | | | | add support for multipl types in one lineMichael Vogt2014-01-201-4/+4
| | | | |
* | | | | add support for multiple URIs in deb822 style sources.listMichael Vogt2014-01-201-2/+2
| | | | |
* | | | | add Description tag for deb822 sourcesMichael Vogt2014-01-201-2/+2
| |_|_|/ |/| | |
* | | | rename "Suite/Section" to pluralMichael Vogt2014-01-181-2/+2
| |_|/ |/| |
* | | implement suggestion by donkult (thanks!)Michael Vogt2014-01-171-2/+2
| |/ |/|
* | update libapt testMichael Vogt2014-01-161-4/+4
|/
* add unittest for new sourceslist parser as wellMichael Vogt2013-12-051-0/+52