X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/85bf001994fa59ca979293af3abb89d3486e0afb..62f6ecbf2f204d95e98fc5480c5a0db43b52d2be:/test/libapt/strutil_test.cc diff --git a/test/libapt/strutil_test.cc b/test/libapt/strutil_test.cc index b044b7f34..8215654d0 100644 --- a/test/libapt/strutil_test.cc +++ b/test/libapt/strutil_test.cc @@ -65,5 +65,27 @@ int main(int argc,char *argv[]) equals(result[0], "x"); equals(result[1], "y:z"); + input = "abc"; + 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; }