summaryrefslogtreecommitdiff
path: root/tests/utils/test4.cpp
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2014-10-15 11:26:54 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2014-10-15 11:26:54 +0200
commita5645f8dc580ec51c75e296e53b484440f40683e (patch)
treef7b050035fb4296398652944c5b33c4625df7d7a /tests/utils/test4.cpp
parente2f8ce69fdaf9da19eb0adb9595d8daa18668137 (diff)
downloadcrawler-a5645f8dc580ec51c75e296e53b484440f40683e.tar.gz
crawler-a5645f8dc580ec51c75e296e53b484440f40683e.tar.bz2
added a test for stringutils split
Diffstat (limited to 'tests/utils/test4.cpp')
-rwxr-xr-xtests/utils/test4.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/utils/test4.cpp b/tests/utils/test4.cpp
new file mode 100755
index 0000000..efc5b34
--- /dev/null
+++ b/tests/utils/test4.cpp
@@ -0,0 +1,18 @@
+#include "StringUtils.hpp"
+
+#include <vector>
+#include <string>
+#include <iostream>
+
+using namespace std;
+
+int main( void )
+{
+ vector<string> parts = split( "this.is.a..test", ".", true );
+
+ for( size_t i = 0; i < parts.size( ); i++ ) {
+ cout << i << ". '" << parts[i] << "'" << endl;
+ }
+
+ return 0;
+}