summaryrefslogtreecommitdiff
path: root/test/libapt/uri_test.cc
Commit message (Collapse)AuthorAgeFilesLines
* Prevent GTest from flooding us with compiler warningsDavid Kalnischkies2018-05-041-13/+13
| | | | | | | | | | | | | | 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.
* Do not read stderr from proxy autodetection scriptsJulian Andres Klode2016-10-041-0/+26
| | | | | | | | | | | | | This fixes a regression introduced in commit 8f858d560e3b7b475c623c4e242d1edce246025a don't leak FD in AutoProxyDetect command return parsing which accidentally made the proxy autodetection code also read the scripts output on stderr, not only on stdout when it switched the code from popen() to Popen(). Reported-By: Tim Small <tim@seoss.co.uk>
* allow user@host (aka: no password) in URI parsingDavid Kalnischkies2016-08-101-0/+12
| | | | If the URI had no password the username was ignored
* tests: reenable basic auth test and add @ in usernameDavid Kalnischkies2016-03-191-1/+9
| | | | | | | | | | On launchpad #1558484 a user reports that @ in the authentication tokens parsing of sources.list isn't working in an older (precise) version. It isn't the recommended way of specifying passwords and co (auth.conf is), but we can at least test for regressions (and in this case test at all… who was that "clever" boy disabling a test with exit……… oh, nevermind. Git-Dch: Ignore
* show URI.Path in all acquire item descriptionsDavid Kalnischkies2015-06-111-0/+39
| | | | | | | | | | | | | | It is a rather strange sight that index items use SiteOnly which strips the Path, while e.g. deb files are downloaded with NoUserPassword which does not. Important to note here is that for the file transport Path is pretty important as there is no Host which would be displayed by Site, which always resulted in "interesting" unspecific errors for "file:". Adding a 'middle' ground between the two which does show the Path but potentially modifies it (it strips a pending / at the end if existing) solves this "file:" issue, syncs the output and in the end helps to identify which file is meant exactly in progress output and co as a single site can have multiple repositories in different paths.
* reimplement the last uses of sprintfDavid Kalnischkies2015-04-101-0/+12
| | | | | | | | Working with strings c-style is complicated and error-prune, so by converting to c++ style we gain some simplicity and avoid buffer overflows by later extensions. Git-Dch: Ignore
* use Google C++ Testing Framework for libapt testsDavid Kalnischkies2014-04-161-119/+114
| | | | | | | | | | | | 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/+4
| | | | | | | | 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)
* fix uri testMichael Vogt2013-05-081-1/+1
|
* merged patch from Daniel Hartwig to fix URI and proxy releated issuesMichael Vogt2013-05-081-0/+8
|
* write a proper testcase replacing the print-only uri.cc testDavid Kalnischkies2011-08-151-0/+112