summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-09-07 13:12:50 +0200
committerMichael Vogt <mvo@debian.org>2013-09-07 13:12:50 +0200
commit85bf001994fa59ca979293af3abb89d3486e0afb (patch)
tree9ede8d92d8b143506eecb2287f7891876ca2bd77 /test
parent00f4d9ffa3468e899abf8fbda8db71fc3143b8e5 (diff)
add maxsplit parameter to StringSplit
Diffstat (limited to 'test')
-rw-r--r--test/libapt/strutil_test.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/libapt/strutil_test.cc b/test/libapt/strutil_test.cc
index bac9dd2f1..b044b7f34 100644
--- a/test/libapt/strutil_test.cc
+++ b/test/libapt/strutil_test.cc
@@ -59,5 +59,11 @@ int main(int argc,char *argv[])
result = StringSplit(input, "");
equals(result.size(), 0);
+ input = "x:y:z";
+ result = StringSplit(input, ":", 2);
+ equals(result.size(), 2);
+ equals(result[0], "x");
+ equals(result[1], "y:z");
+
return 0;
}