@@ -49,7 +49,7 @@ char longer_sample[]="z1234567*89abcde&fghijklmnopqrstuvwxyzAB%CDEFGHIJKLMNOPQRS
4949int
5050main ()
5151{
52- TEST_START (13 );
52+ TEST_START (18 );
5353/* Test Galley Sereies with fixed size stampp*/
5454 {/* 1..4*/
5555 std::string expected1 =" 12" ;
7777
7878ok (res.empty ()," GalleySeries, fixed size string stamp: The rest of the list is empty" );
7979 }
80- /* Test Galley Sereies with unlimited sizestampp */
80+ /* Test Galley Sereies with unlimited sizestamp */
8181 {/* 5 .. 9*/
8282/* This is not the best test, as we do not predict behavior by setting forged sample values,
8383 but at least here we check that it work the same way it worked before. May be this test should be improved later*/
@@ -144,5 +144,46 @@ main()
144144ok (res.empty ()," GalleySeries, fixed size binary stamp: The rest of the list is empty" );
145145 }
146146
147+ /* Test Galley Sereies with variated size stamp*/
148+ {/* 14 .. 18*/
149+ /* This is not the best test, as we do not predict behavior by setting forged sample values,
150+ but at least here we check that it work the same way it worked before. May be this test should be improved later*/
151+
152+ char sample[]=" z1234567*89abcde&fghijklm" ;
153+
154+ std::string expected1 =" 234" ;
155+ std::string expected2 =" 7*8" ;
156+ std::string expected3 =" bcde" ;
157+ std::string expected4 =" ghij" ;
158+
159+ Blobblob (sample,strlen (sample));
160+ StampSeveralChars stamp;
161+ GalleySeriesgalley (stamp);
162+
163+ std::list<std::string> res = galley.ExtractStr (blob);
164+ std::string str;
165+
166+ str = res.front ();
167+ is (str, expected1," GalleySeries, unlimited size string stamp: First element of shifted list is ok" );
168+ res.pop_front ();
169+
170+ str = res.front ();
171+ is (str, expected2," GalleySeries, unlimited size string stamp: Second element of shifted list is ok" );
172+ res.pop_front ();
173+
174+ str = res.front ();
175+ is (str, expected3," GalleySeries, unlimited size string stamp: Third element of shifted list is ok" );
176+ res.pop_front ();
177+
178+ str = res.front ();
179+ is (str, expected4," GalleySeries, unlimited size string stamp: Fourth element of shifted list is ok" );
180+ res.pop_front ();
181+
182+ ok (res.empty ()," GalleySeries, unlimited size string stamp: The rest of the list is empty" );
183+ }
184+
185+
186+
187+
147188 TEST_END;
148189}