From 25cbafb27333be4c069427c731a6168bfcf73532 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Mon, 19 Nov 2007 23:12:52 -0200 Subject: [PATCH] add flower/test-string.cc --- flower/test-string.cc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 flower/test-string.cc diff --git a/flower/test-string.cc b/flower/test-string.cc new file mode 100644 index 0000000000..509aea0728 --- /dev/null +++ b/flower/test-string.cc @@ -0,0 +1,24 @@ +#define STD_VECTOR 1 + +#define HAVE_BOOST_LAMBDA 1 +#include "std-vector.hh" + +#include + +#include "yaffut.hh" + +#if !STD_VECTOR +#define vector flower_vector +#endif + +using namespace std; + + +FUNC (string_split_join) +{ + string orig = "a/bbbb/cc//d"; + vector splits = string_split (orig, '/'); + string loop = string_join (splits, "/"); + EQUAL(orig, loop); + EQUAL(splits.size (), size_t (5)); +} -- 2.39.2