/** @file
$Id$
$Date$
$Author$
@copy © Marc Wäckerlin
@license LGPL, see file COPYING
$Log$
Revision 1.2 2005/01/07 00:35:17 marc
initial version
Revision 1.1 2004/12/17 16:26:58 marc
initial version
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
class TokenizerTest: public CppUnit::TestFixture {
public:
void CheckNonGreedy() {
const std::string aux[] = {"first", "second", "third", "", "fifth"};
std::list a(aux, aux+sizeof(aux)/sizeof(std::string)), b;
mrw::Tokenizer token("first,second,third,,fifth", false, ",");
while (token) b< a(aux, aux+sizeof(aux)/sizeof(std::string)), b;
mrw::Tokenizer token("Hello world, here I am!", true, " \t\n,.?!");
while (token) b< a(aux, aux+sizeof(aux)/sizeof(std::string)), b;
mrw::Tokenizer token("first,second,third,,fifth", false, ",");
while (token) b< a2(aux2, aux2+sizeof(aux2)/sizeof(std::string)),
b2, b3;
token.reset("a,b,c,d,e");
while (token) b2<