File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change 1515 },
1616 "license" : " MIT" ,
1717 "dependencies" : {
18- "@abaplint/cli" : " ^2.113.233 " ,
18+ "@abaplint/cli" : " ^2.113.234 " ,
1919 "@abaplint/database-pg" : " ^2.11.78" ,
2020 "@abaplint/database-sqlite" : " ^2.11.78" ,
21- "@abaplint/runtime" : " ^2.12.7 " ,
22- "@abaplint/transpiler-cli" : " ^2.12.7 " ,
21+ "@abaplint/runtime" : " ^2.12.8 " ,
22+ "@abaplint/transpiler-cli" : " ^2.12.8 " ,
2323 "0x" : " ^6.0.0"
2424 }
2525}
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ CLASS ltcl_test DEFINITION FOR TESTING DURATION SHORT RISK LEVEL HARMLESS FINAL.
1111 METHODS replace_oo FOR TESTING RAISING cx_static_check.
1212 METHODS pcre_slashes FOR TESTING RAISING cx_static_check.
1313 METHODS classic_slashes FOR TESTING RAISING cx_static_check.
14+ METHODS digits FOR TESTING RAISING cx_static_check.
1415
1516ENDCLASS .
1617
@@ -218,4 +219,25 @@ CLASS ltcl_test IMPLEMENTATION.
218219
219220 ENDMETHOD .
220221
222+ METHOD digits .
223+
224+ DATA l_offset TYPE i .
225+ DATA l_counter TYPE string .
226+ DATA name TYPE string .
227+ DATA lo_regex TYPE REF TO cl_abap_regex.
228+
229+ name = 'notFound' .
230+ CREATE OBJECT lo_regex EXPORTING pattern = '([[:digit:]]*)$' .
231+ FIND FIRST OCCURRENCE OF REGEX lo_regex IN name SUBMATCHES l_counter MATCH OFFSET l_offset.
232+
233+ cl_abap_unit_assert=>assert_equals(
234+ act = l_counter
235+ exp = '' ).
236+
237+ cl_abap_unit_assert=>assert_equals(
238+ act = l_offset
239+ exp = 8 ).
240+
241+ ENDMETHOD .
242+
221243ENDCLASS .
You can’t perform that action at this time.
0 commit comments