Skip to content

Commit

Permalink
Clear variables when getting i18n files (abapGit#6978)
Browse files Browse the repository at this point in the history
  • Loading branch information
albertmink authored Jul 11, 2024
1 parent a7fbf22 commit faac854
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/objects/core/zcl_abapgit_filename_logic.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ CLASS zcl_abapgit_filename_logic IMPLEMENTATION.

DATA lo_dot TYPE REF TO zcl_abapgit_dot_abapgit.

CLEAR: ev_lang, ev_ext.
lo_dot = zcl_abapgit_dot_abapgit=>build_default( ).

file_to_object(
Expand Down
38 changes: 30 additions & 8 deletions src/objects/core/zcl_abapgit_filename_logic.clas.testclasses.abap
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ CLASS ltcl_run_checks DEFINITION FOR TESTING RISK LEVEL HARMLESS

METHODS:
setup,
is_obj_def_file FOR TESTING,
dot_abapgit FOR TESTING RAISING zcx_abapgit_exception,
file_to_object FOR TESTING RAISING zcx_abapgit_exception,
object_to_file FOR TESTING RAISING zcx_abapgit_exception,
i18n_file_to_object FOR TESTING RAISING zcx_abapgit_exception,
object_to_i18n_file FOR TESTING RAISING zcx_abapgit_exception,
file_to_object_package FOR TESTING RAISING zcx_abapgit_exception,
object_to_file_package FOR TESTING RAISING zcx_abapgit_exception.
is_obj_def_file FOR TESTING,
dot_abapgit FOR TESTING RAISING zcx_abapgit_exception,
file_to_object FOR TESTING RAISING zcx_abapgit_exception,
object_to_file FOR TESTING RAISING zcx_abapgit_exception,
i18n_file_to_object FOR TESTING RAISING zcx_abapgit_exception,
object_to_i18n_file FOR TESTING RAISING zcx_abapgit_exception,
file_to_object_package FOR TESTING RAISING zcx_abapgit_exception,
object_to_file_package FOR TESTING RAISING zcx_abapgit_exception,
i18n_file_to_object_is_initial FOR TESTING RAISING zcx_abapgit_exception.

ENDCLASS.

Expand Down Expand Up @@ -383,6 +384,27 @@ CLASS ltcl_run_checks IMPLEMENTATION.

ENDMETHOD.

METHOD i18n_file_to_object_is_initial.
DATA lv_lang TYPE laiso.
DATA lv_ext TYPE string.

lv_ext = `txt`.
lv_lang = `E`.

zcl_abapgit_filename_logic=>i18n_file_to_object(
EXPORTING
iv_filename = 'zif_abapgit.intf.abap'
iv_path = '/src/'
IMPORTING
ev_lang = lv_lang
ev_ext = lv_ext ).

cl_abap_unit_assert=>assert_initial( lv_ext ).
cl_abap_unit_assert=>assert_initial( lv_lang ).

ENDMETHOD.


METHOD i18n_file_to_object.

DATA ls_item TYPE zif_abapgit_definitions=>ty_item.
Expand Down

0 comments on commit faac854

Please sign in to comment.