mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-02 04:36:49 +08:00
Missing objects in overwrite confirmation popup (#3558)
* Missing objects in overwrite confirmation popup Closes https://github.com/larshp/abapGit/issues/3550 * Unit tests Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
parent
493bb969b2
commit
9d29fe57ce
|
@ -899,7 +899,8 @@ CLASS ZCL_ABAPGIT_OBJECTS IMPLEMENTATION.
|
||||||
SORT rt_results
|
SORT rt_results
|
||||||
BY obj_type ASCENDING
|
BY obj_type ASCENDING
|
||||||
obj_name ASCENDING
|
obj_name ASCENDING
|
||||||
rstate DESCENDING. " ensures that non-empty rstate is kept
|
rstate DESCENDING " ensures that non-empty rstate is kept
|
||||||
|
lstate DESCENDING. " ensures that non-empty lstate is kept
|
||||||
DELETE ADJACENT DUPLICATES FROM rt_results COMPARING obj_type obj_name.
|
DELETE ADJACENT DUPLICATES FROM rt_results COMPARING obj_type obj_name.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
@ -1100,7 +1101,7 @@ CLASS ZCL_ABAPGIT_OBJECTS IMPLEMENTATION.
|
||||||
APPEND <ls_result> TO rt_results.
|
APPEND <ls_result> TO rt_results.
|
||||||
ENDLOOP.
|
ENDLOOP.
|
||||||
|
|
||||||
* TOBJ has to be handled before ODSO
|
* TOBJ has to be handled before SCP1
|
||||||
LOOP AT it_results ASSIGNING <ls_result> WHERE obj_type = 'TOBJ'.
|
LOOP AT it_results ASSIGNING <ls_result> WHERE obj_type = 'TOBJ'.
|
||||||
APPEND <ls_result> TO rt_results.
|
APPEND <ls_result> TO rt_results.
|
||||||
ENDLOOP.
|
ENDLOOP.
|
||||||
|
|
|
@ -553,6 +553,8 @@ CLASS ltcl_filter_files_to_deser DEFINITION FINAL FOR TESTING
|
||||||
filter_duplicates_lstate FOR TESTING RAISING cx_static_check,
|
filter_duplicates_lstate FOR TESTING RAISING cx_static_check,
|
||||||
filter_duplicates_match FOR TESTING RAISING cx_static_check,
|
filter_duplicates_match FOR TESTING RAISING cx_static_check,
|
||||||
filter_duplicates_init_objtype FOR TESTING RAISING cx_static_check,
|
filter_duplicates_init_objtype FOR TESTING RAISING cx_static_check,
|
||||||
|
filter_duplicates_changes_01 FOR TESTING RAISING cx_static_check,
|
||||||
|
filter_duplicates_changes_02 FOR TESTING RAISING cx_static_check,
|
||||||
|
|
||||||
given_result
|
given_result
|
||||||
IMPORTING
|
IMPORTING
|
||||||
|
@ -652,6 +654,57 @@ CLASS ltcl_filter_files_to_deser IMPLEMENTATION.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
METHOD filter_duplicates_changes_01.
|
||||||
|
|
||||||
|
DATA: ls_exp LIKE LINE OF mt_result,
|
||||||
|
ls_act LIKE LINE OF mt_result.
|
||||||
|
|
||||||
|
" test different order since SORT object,obj_name is non-deterministic
|
||||||
|
given_result( |CLAS;ZAG_UNIT_TEST;;/src/;zag_unit_test.clas.abap;;;M;M| ).
|
||||||
|
given_result( |CLAS;ZAG_UNIT_TEST;;/src/;zag_unit_test.clas.testclasses.abap;;;;M| ).
|
||||||
|
|
||||||
|
READ TABLE mt_result INDEX 1 INTO ls_exp.
|
||||||
|
|
||||||
|
when_filter_is_applied( ).
|
||||||
|
|
||||||
|
cl_abap_unit_assert=>assert_equals(
|
||||||
|
exp = 1
|
||||||
|
act = lines( mt_result ) ).
|
||||||
|
|
||||||
|
READ TABLE mt_result INDEX 1 INTO ls_act.
|
||||||
|
|
||||||
|
" expect M,M
|
||||||
|
cl_abap_unit_assert=>assert_equals(
|
||||||
|
exp = ls_exp
|
||||||
|
act = ls_act ).
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
METHOD filter_duplicates_changes_02.
|
||||||
|
|
||||||
|
DATA: ls_exp LIKE LINE OF mt_result,
|
||||||
|
ls_act LIKE LINE OF mt_result.
|
||||||
|
|
||||||
|
" test different order since SORT object,obj_name is non-deterministic
|
||||||
|
given_result( |CLAS;ZAG_UNIT_TEST;;/src/;zag_unit_test.clas.abap;;;;M| ).
|
||||||
|
given_result( |CLAS;ZAG_UNIT_TEST;;/src/;zag_unit_test.clas.testclasses.abap;;;M;M| ).
|
||||||
|
|
||||||
|
READ TABLE mt_result INDEX 2 INTO ls_exp.
|
||||||
|
|
||||||
|
when_filter_is_applied( ).
|
||||||
|
|
||||||
|
cl_abap_unit_assert=>assert_equals(
|
||||||
|
exp = 1
|
||||||
|
act = lines( mt_result ) ).
|
||||||
|
|
||||||
|
READ TABLE mt_result INDEX 1 INTO ls_act.
|
||||||
|
|
||||||
|
" expect M,M
|
||||||
|
cl_abap_unit_assert=>assert_equals(
|
||||||
|
exp = ls_exp
|
||||||
|
act = ls_act ).
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
METHOD given_result.
|
METHOD given_result.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user