diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2014-10-15 11:26:54 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2014-10-15 11:26:54 +0200 |
commit | a5645f8dc580ec51c75e296e53b484440f40683e (patch) | |
tree | f7b050035fb4296398652944c5b33c4625df7d7a /tests/utils/test4.cpp | |
parent | e2f8ce69fdaf9da19eb0adb9595d8daa18668137 (diff) | |
download | crawler-a5645f8dc580ec51c75e296e53b484440f40683e.tar.gz crawler-a5645f8dc580ec51c75e296e53b484440f40683e.tar.bz2 |
added a test for stringutils split
Diffstat (limited to 'tests/utils/test4.cpp')
-rwxr-xr-x | tests/utils/test4.cpp | 18 |
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; +} |