@@ -26,7 +26,14 @@ public void parsePattern_valueType_duration(){
2626 assertTrue (parsed .containsKey ("foo" ));
2727 assertEquals (ValueType .Duration ,parsed .get ("foo" ).getType ());
2828 }
29-
29+ @ Test
30+ public void parsePattern_valueType_add_space_separator (){
31+ Map <String ,Exp .ValueInfo > parsed = Exp .parsePattern ("(?<foo:add= >" );
32+ assertNotNull (parsed );
33+ assertTrue (parsed .containsKey ("foo" ));
34+ assertEquals (ValueMerge .Add ,parsed .get ("foo" ).getMerge ());
35+ assertEquals (" " ,parsed .get ("foo" ).getTarget ());
36+ }
3037 @ Test @ Ignore
3138 public void removePatternValues_negative_lookbehind (){
3239 String input = "((?<![\\ \\ ])['\" ])(?<name>(?:.(?!(?<![\\ \\ ])\\ 1))*.?)\\ 1" ;
@@ -217,7 +224,25 @@ public void asEntry_build_array(){
217224 assertTrue ("root[1] should have an a" ,json .has ("a" ));
218225
219226 }
227+ //still a work in progress
228+ @ Test @ Ignore
229+ public void pushTarget_no_capture (){
230+ Exp push = new Exp ("push" ,"a" ).addRule (ExpRule .PushTarget ).addRule (ExpRule .PreClearTarget ).nest ("nest" ).setMerge (ExpMerge .AsEntry );
231+ Exp entry = new Exp ("entry" ,"(?<a>\\ S) (?<b>\\ S)" ).setMerge (ExpMerge .AsEntry );
232+ JsonBuilder b = new JsonBuilder ();
233+ push .apply (factory .apply ("a" ),b ,null );
234+ System .out .println ("First a\n " +b .debug (true ));
235+ entry .apply (factory .apply ("1 2" ),b ,null );
220236
237+ entry .apply (factory .apply ("3 4" ),b ,null );
238+ System .out .println ("Before next a\n " +b .debug (true ));
239+ push .apply (factory .apply ("a" ),b ,null );
240+ System .out .println ("Second a\n " +b .debug (true ));
241+ entry .apply (factory .apply ("1 2" ),b ,null );
242+
243+ System .out .println (b .size ());
244+ System .out .println (b .getRoot ().toString (2 ));
245+ }
221246
222247 @ Test
223248 public void pushTarget_named (){
0 commit comments