Fix trimming of horizontal tabs (#779)

This commit is contained in:
Christian Günter 2024-01-13 14:46:13 +01:00 committed by GitHub
parent d551b774e2
commit 641aad97a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -279,7 +279,7 @@ CLASS z2ui5_cl_util_func IMPLEMENTATION.
result = shift_left( shift_right( CONV string( val ) ) ).
result = shift_right( val = result sub = cl_abap_char_utilities=>horizontal_tab ).
result = shift_left( val = result sub = cl_abap_char_utilities=>horizontal_tab ).
result = shift_left( shift_right( CONV string( val ) ) ).
result = shift_left( shift_right( result ) ).
ENDMETHOD.

View File

@ -82,6 +82,7 @@ CLASS ltcl_unit_test DEFINITION FINAL FOR TESTING
METHODS test_c_trim_lower FOR TESTING RAISING cx_static_check.
METHODS test_c_trim_upper FOR TESTING RAISING cx_static_check.
METHODS test_c_replace_assign_struc FOR TESTING RAISING cx_static_check.
METHODS test_c_trim_horizontal_tab FOR TESTING RAISING cx_static_check.
METHODS test_time_get_timestampl FOR TESTING RAISING cx_static_check.
METHODS test_time_substract_seconds FOR TESTING RAISING cx_static_check.
@ -839,4 +840,15 @@ CLASS ltcl_unit_test IMPLEMENTATION.
ENDMETHOD.
METHOD test_c_trim_horizontal_tab.
IF z2ui5_cl_util_func=>c_trim( |{ cl_abap_char_utilities=>horizontal_tab }|
&& |JsadfHHs|
&& |{ cl_abap_char_utilities=>horizontal_tab }| ) <> `JsadfHHs`.
cl_abap_unit_assert=>fail( ).
ENDIF.
ENDMETHOD.
ENDCLASS.