mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 12:20:51 +08:00
Reduce memory consumption during deserialize (#4389)
* Reduce memory consumption during deserialize Fix issue with namespace objects https://github.com/abapGit/abapGit/pull/4357 * Unit test
This commit is contained in:
parent
eb5fdfb404
commit
6b23aaa0fd
|
@ -278,6 +278,9 @@ CLASS zcl_abapgit_objects_files IMPLEMENTATION.
|
||||||
|
|
||||||
METHOD get_file_pattern.
|
METHOD get_file_pattern.
|
||||||
rv_pattern = filename( iv_ext = '*' ).
|
rv_pattern = filename( iv_ext = '*' ).
|
||||||
|
" Escape special characters for use with 'covers pattern' (CP)
|
||||||
|
REPLACE ALL OCCURRENCES OF '#' IN rv_pattern WITH '##'.
|
||||||
|
REPLACE ALL OCCURRENCES OF '+' IN rv_pattern WITH '#+'.
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -125,10 +125,23 @@ CLASS ltcl_objects_files IMPLEMENTATION.
|
||||||
|
|
||||||
METHOD get_file_pattern.
|
METHOD get_file_pattern.
|
||||||
|
|
||||||
|
DATA ls_item TYPE zif_abapgit_definitions=>ty_item.
|
||||||
|
|
||||||
cl_abap_unit_assert=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
exp = 'zlf.prog.*'
|
exp = 'zlf.prog.*'
|
||||||
act = mo_cut->get_file_pattern( ) ).
|
act = mo_cut->get_file_pattern( ) ).
|
||||||
|
|
||||||
|
ls_item-obj_type = 'prog'.
|
||||||
|
ls_item-obj_name = '/test/zlf'.
|
||||||
|
|
||||||
|
CREATE OBJECT mo_cut
|
||||||
|
EXPORTING
|
||||||
|
is_item = ls_item.
|
||||||
|
|
||||||
|
cl_abap_unit_assert=>assert_equals(
|
||||||
|
exp = '##test##zlf.prog.*'
|
||||||
|
act = mo_cut->get_file_pattern( ) ).
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user