mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 12:20:51 +08:00
parent
dc51247e9b
commit
7d5d1cabca
|
@ -142,7 +142,7 @@ ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CLASS zcl_abapgit_file_status IMPLEMENTATION.
|
CLASS ZCL_ABAPGIT_FILE_STATUS IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD build_existing.
|
METHOD build_existing.
|
||||||
|
@ -710,6 +710,7 @@ CLASS zcl_abapgit_file_status IMPLEMENTATION.
|
||||||
WITH KEY path = <ls_remote>-path filename = <ls_remote>-filename
|
WITH KEY path = <ls_remote>-path filename = <ls_remote>-filename
|
||||||
BINARY SEARCH.
|
BINARY SEARCH.
|
||||||
IF sy-subrc = 0.
|
IF sy-subrc = 0.
|
||||||
|
<ls_result>-match = abap_false.
|
||||||
<ls_result>-lstate = zif_abapgit_definitions=>c_state-deleted.
|
<ls_result>-lstate = zif_abapgit_definitions=>c_state-deleted.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
|
@ -686,6 +686,9 @@ CLASS ltcl_calculate_status DEFINITION FOR TESTING RISK LEVEL HARMLESS
|
||||||
|
|
||||||
METHODS:
|
METHODS:
|
||||||
setup,
|
setup,
|
||||||
|
complete_local,
|
||||||
|
complete_remote,
|
||||||
|
complete_state,
|
||||||
only_remote FOR TESTING RAISING zcx_abapgit_exception,
|
only_remote FOR TESTING RAISING zcx_abapgit_exception,
|
||||||
only_local FOR TESTING RAISING zcx_abapgit_exception,
|
only_local FOR TESTING RAISING zcx_abapgit_exception,
|
||||||
match FOR TESTING RAISING zcx_abapgit_exception,
|
match FOR TESTING RAISING zcx_abapgit_exception,
|
||||||
|
@ -693,10 +696,8 @@ CLASS ltcl_calculate_status DEFINITION FOR TESTING RISK LEVEL HARMLESS
|
||||||
moved FOR TESTING RAISING zcx_abapgit_exception,
|
moved FOR TESTING RAISING zcx_abapgit_exception,
|
||||||
local_outside_main FOR TESTING RAISING zcx_abapgit_exception,
|
local_outside_main FOR TESTING RAISING zcx_abapgit_exception,
|
||||||
complete FOR TESTING RAISING zcx_abapgit_exception,
|
complete FOR TESTING RAISING zcx_abapgit_exception,
|
||||||
complete_local,
|
only_local2 FOR TESTING RAISING zcx_abapgit_exception,
|
||||||
complete_remote,
|
only_remote2 FOR TESTING RAISING zcx_abapgit_exception.
|
||||||
complete_state,
|
|
||||||
deleted_remotely FOR TESTING RAISING zcx_abapgit_exception.
|
|
||||||
|
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
||||||
|
@ -1137,7 +1138,7 @@ CLASS ltcl_calculate_status IMPLEMENTATION.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
METHOD deleted_remotely.
|
METHOD only_local2.
|
||||||
|
|
||||||
mo_helper->add_local(
|
mo_helper->add_local(
|
||||||
iv_path = '/src/'
|
iv_path = '/src/'
|
||||||
|
@ -1155,8 +1156,44 @@ CLASS ltcl_calculate_status IMPLEMENTATION.
|
||||||
|
|
||||||
" it should appear as deleted remotely
|
" it should appear as deleted remotely
|
||||||
cl_abap_unit_assert=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = mo_result->get_line( 1 )-rstate
|
act = mo_result->get_line( 1 )-lstate
|
||||||
exp = zif_abapgit_definitions=>c_state-deleted ).
|
exp = zif_abapgit_definitions=>c_state-added ).
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
METHOD only_remote2.
|
||||||
|
|
||||||
|
mo_helper->add_local(
|
||||||
|
iv_path = '/src/sub/'
|
||||||
|
iv_obj_name = 'ZCL_CLAS'
|
||||||
|
iv_obj_type = 'CLAS'
|
||||||
|
iv_filename = 'zcl_clas.clas.abap'
|
||||||
|
iv_sha1 = '112233' ).
|
||||||
|
|
||||||
|
mo_helper->add_remote(
|
||||||
|
iv_path = '/src/sub/'
|
||||||
|
iv_filename = 'zcl_clas.clas.abap'
|
||||||
|
iv_sha1 = '332211' ).
|
||||||
|
|
||||||
|
|
||||||
|
mo_helper->add_remote(
|
||||||
|
iv_path = '/src/sub/'
|
||||||
|
iv_filename = 'zcl_clas.clas.locals_imp.abap'
|
||||||
|
iv_sha1 = '1111' ).
|
||||||
|
|
||||||
|
mo_helper->add_state(
|
||||||
|
iv_path = '/src/sub/'
|
||||||
|
iv_filename = 'zcl_clas.clas.locals_imp.abap'
|
||||||
|
iv_sha1 = '1111' ).
|
||||||
|
|
||||||
|
mo_result = mo_helper->run( iv_devclass = '$DIFFERENT$' ).
|
||||||
|
|
||||||
|
mo_result->assert_lines( 2 ).
|
||||||
|
|
||||||
|
cl_abap_unit_assert=>assert_equals(
|
||||||
|
act = mo_result->get_line( 2 )-match
|
||||||
|
exp = abap_false ).
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user