summaryrefslogtreecommitdiff
path: root/test/libapt/strutil_test.cc
Commit message (Collapse)AuthorAgeFilesLines
* encode UTF-8 characters correctly in QuoteStringDavid Kalnischkies2015-11-051-0/+11
| | | | | | | Limit the field length to a char to avoid bogus FF for utf-8 characters with the default length. Closes: 799123
* reimplement the last uses of sprintfDavid Kalnischkies2015-04-101-0/+22
| | | | | | | | 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
* rewrite ReadMessages()David Kalnischkies2014-10-261-0/+70
| | | | | | | | | | | | | Central methods of our infrastructure like this one responsible for communication with our methods shouldn't be more complicated then they have to and not claim to have (albeit unlikely) bugs. While I am not sure about having improved the first part, the bug is now gone and a few explicit tests check that it stays that way, so nobody will notice the difference (hopefully) – expect that this should a very tiny bit faster as well as we don't manually proceed through the string. Git-Dch: Ignore
* add test for Basic Authentication schemeDavid Kalnischkies2014-10-231-1/+15
| | | | Git-Dch: Ignore
* Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-09-231-0/+15
|\ | | | | | | | | | | | | | | | | Conflicts: apt-pkg/acquire-item.cc apt-pkg/acquire-item.h apt-pkg/cachefilter.h configure.ac debian/changelog
| * strip everything spacey in APT::String::StripDavid Kalnischkies2014-09-071-0/+15
| | | | | | | | Git-Dch: Ignore
* | Only allow "apt-get build-dep path" when path starts with ./ or /Michael Vogt2014-07-081-0/+9
|/ | | | | | This avoid the subtle problem that someone might have a directory with the same package name as the build-depends he/she is trying to fetch. Also print a note that the specific file/dir is used.
* fix SubstVar to be usable as a replace_all methodDavid Kalnischkies2014-06-181-0/+35
| | | | | | | The name suggests that it is supposed to substitute a variable with a value, but we tend to use it in a more liberal replace_all() fashion, but this breaks if either of the parameters is empty or more importantly if two "variable" occurrences follow each other directly.
* use Google C++ Testing Framework for libapt testsDavid Kalnischkies2014-04-161-81/+57
| | | | | | | | | | | | 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-1/+6
| | | | | | | | 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
* add "APT::String::Endswith" and automatic adding of ".list" in apt edit-sourceMichael Vogt2013-11-291-0/+18
|
* change maxsplit default from "0" to maxintMichael Vogt2013-10-011-0/+4
|
* add maxsplit parameter to StringSplitMichael Vogt2013-09-071-0/+6
|
* implement StringSplit() as we need this to fix the dpkg status-fd output parsingMichael Vogt2013-09-071-0/+17
|
* do not pollute namespace in the headers with using (Closes: #500198)David Kalnischkies2011-09-191-1/+1
|
* add another escape test case, fixup octal one (its \0XX instead of \0XXX)Michael Vogt2011-07-261-0/+6
|
* * apt-pkg/contrib/strutl.{h,cc}, test/libapt/strutil_test.cc:Michael Vogt2011-07-261-0/+40
- add new DeEscapeString() similar to DeQuoteQuotedWord but unescape charackter escapes like \0XXX and \xXX (plus add test)