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.
|
||||
|
@ -710,6 +710,7 @@ CLASS zcl_abapgit_file_status IMPLEMENTATION.
|
|||
WITH KEY path = <ls_remote>-path filename = <ls_remote>-filename
|
||||
BINARY SEARCH.
|
||||
IF sy-subrc = 0.
|
||||
<ls_result>-match = abap_false.
|
||||
<ls_result>-lstate = zif_abapgit_definitions=>c_state-deleted.
|
||||
ENDIF.
|
||||
ENDIF.
|
||||
|
|
|
@ -686,6 +686,9 @@ CLASS ltcl_calculate_status DEFINITION FOR TESTING RISK LEVEL HARMLESS
|
|||
|
||||
METHODS:
|
||||
setup,
|
||||
complete_local,
|
||||
complete_remote,
|
||||
complete_state,
|
||||
only_remote FOR TESTING RAISING zcx_abapgit_exception,
|
||||
only_local 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,
|
||||
local_outside_main FOR TESTING RAISING zcx_abapgit_exception,
|
||||
complete FOR TESTING RAISING zcx_abapgit_exception,
|
||||
complete_local,
|
||||
complete_remote,
|
||||
complete_state,
|
||||
deleted_remotely FOR TESTING RAISING zcx_abapgit_exception.
|
||||
only_local2 FOR TESTING RAISING zcx_abapgit_exception,
|
||||
only_remote2 FOR TESTING RAISING zcx_abapgit_exception.
|
||||
|
||||
ENDCLASS.
|
||||
|
||||
|
@ -1137,7 +1138,7 @@ CLASS ltcl_calculate_status IMPLEMENTATION.
|
|||
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD deleted_remotely.
|
||||
METHOD only_local2.
|
||||
|
||||
mo_helper->add_local(
|
||||
iv_path = '/src/'
|
||||
|
@ -1155,8 +1156,44 @@ CLASS ltcl_calculate_status IMPLEMENTATION.
|
|||
|
||||
" it should appear as deleted remotely
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
act = mo_result->get_line( 1 )-rstate
|
||||
exp = zif_abapgit_definitions=>c_state-deleted ).
|
||||
act = mo_result->get_line( 1 )-lstate
|
||||
exp = zif_abapgit_definitions=>c_state-added ).
|
||||
|
||||
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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user