File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ void iterator_test()
4040 string str1 (" xx-abc--xx-abb" );
4141 string str2 (" Xx-abc--xX-abb-xx" );
4242 string str3 (" xx" );
43+ string strempty (" " );
4344 const char * pch1=" xx-abc--xx-abb" ;
4445 vector<string> tokens;
4546 vector< vector<int > > vtokens;
@@ -123,6 +124,25 @@ void iterator_test()
123124 BOOST_CHECK ( tokens[3 ]==string (" xx" ) );
124125 BOOST_CHECK ( tokens[4 ]==string (" abb" ) );
125126
127+ split (
128+ tokens,
129+ str3,
130+ is_any_of (" ," ),
131+ token_compress_off);
132+
133+ BOOST_REQUIRE ( tokens.size ()==1 );
134+ BOOST_CHECK ( tokens[0 ]==string (" xx" ) );
135+
136+ split (
137+ tokens,
138+ strempty,
139+ is_punct (),
140+ token_compress_off);
141+
142+ BOOST_REQUIRE ( tokens.size ()==1 );
143+ BOOST_CHECK ( tokens[0 ]==string (" " ) );
144+
145+
126146 find_iterator<string::iterator> fiter=make_find_iterator (str1, first_finder (" xx" ));
127147 BOOST_CHECK (equals (*fiter, " xx" ));
128148 ++fiter;
You can’t perform that action at this time.
0 commit comments