diff options
author | Michael Vogt <mvo@debian.org> | 2013-11-29 14:39:27 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2013-11-29 14:39:27 +0100 |
commit | e2264d3f957694e229a9f6976fc136b8f82ad770 (patch) | |
tree | c1f0b9c64d1d60defe5ce1a89c6bc136d758a772 /test/libapt/strutil_test.cc | |
parent | fd4e73c33c20873af670ee40b549c46ee0d50801 (diff) | |
parent | c9a5f74bd57fa4fcf4e30cade8e48c5635448689 (diff) |
Merge branch 'debian/sid' into ubuntu/master
Conflicts:
debian/changelog
Diffstat (limited to 'test/libapt/strutil_test.cc')
-rw-r--r-- | test/libapt/strutil_test.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/libapt/strutil_test.cc b/test/libapt/strutil_test.cc index 110a20d27..8215654d0 100644 --- a/test/libapt/strutil_test.cc +++ b/test/libapt/strutil_test.cc @@ -69,5 +69,23 @@ int main(int argc,char *argv[]) result = StringSplit(input, ""); equals(result.size(), 0); + // endswith + bool b; + input = "abcd"; + b = APT::String::Endswith(input, "d"); + equals(b, true); + + b = APT::String::Endswith(input, "cd"); + equals(b, true); + + b = APT::String::Endswith(input, "abcd"); + equals(b, true); + + b = APT::String::Endswith(input, "x"); + equals(b, false); + + b = APT::String::Endswith(input, "abcndefg"); + equals(b, false); + return 0; } |