summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-11-29 14:39:27 +0100
committerMichael Vogt <mvo@debian.org>2013-11-29 14:39:27 +0100
commite2264d3f957694e229a9f6976fc136b8f82ad770 (patch)
treec1f0b9c64d1d60defe5ce1a89c6bc136d758a772 /test
parentfd4e73c33c20873af670ee40b549c46ee0d50801 (diff)
parentc9a5f74bd57fa4fcf4e30cade8e48c5635448689 (diff)
Merge branch 'debian/sid' into ubuntu/master
Conflicts: debian/changelog
Diffstat (limited to 'test')
-rw-r--r--test/libapt/strutil_test.cc18
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;
}