unit testing test (#4345)

* update deps

* update deps

* remove CHAR01 usages

* update deps

* update deps

* update deps

* all unit tests in syntax now running!

* update deps

* update deps

* update deps

* enable additional exception unit tests

* zcl_abapgit_string_map running

* upd

* login manager running

* update deps, add progress clas

* upd

* update deps

* fix whitespace

* update deps

* upd

* update deps

* update deps

* update deps

* use cl_abap newline

* upd

* run more

* sort

* update deps

* add intf

* update deps

* upd

* add zcl_abapgit_exit

* some xml interfaces

* zcl_abapgit_version running
This commit is contained in:
Lars Hvam 2020-12-27 18:00:59 +01:00 committed by GitHub
parent 408b0bd8e6
commit 704198f521
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 69 additions and 47 deletions

View File

@ -1,21 +1,50 @@
{
"input_folder": "src",
"input_filter": [
"zif_abapgit_definitions",
"zcl_abapgit_convert",
"zcl_abapgit_path",
"zcx_abapgit_exception",
"zcl_abapgit_git_utils",
"zcl_abapgit_hash",
"zcl_abapgit_url",
"zif_abapgit_dot_abapgit",
"zif_abapgit_dot_abapgit",
"zif_abapgit_auth",
"zif_abapgit_apack_definitions",
"zif_abapgit_environment",
"zif_abapgit_cts_api",
"zif_abapgit_http_response",
"zcl_abapgit_html.clas",
"zcl_abapgit_http_digest",
"zcl_abapgit_login_manager",
"zcl_abapgit_path",
"zcl_abapgit_progress",
"zcl_abapgit_string_map",
"zcl_abapgit_syntax_*",
"zif_abapgit_stage_logic"
"zcl_abapgit_url",
"zcl_abapgit_zlib_convert",
"zcl_abapgit_zlib_huffman",
"zcl_abapgit_zlib_stream",
"zcx_abapgit_exception",
"zif_abapgit_apack_definitions",
"zif_abapgit_auth",
"zif_abapgit_cts_api",
"zif_abapgit_definitions",
"zif_abapgit_dot_abapgit",
"zif_abapgit_environment",
"zif_abapgit_exit",
"zcl_abapgit_exit",
"zif_abapgit_ajson_writer",
"zif_abapgit_ajson_reader",
"zif_abapgit_frontend_services",
"zif_abapgit_xml_output",
"zif_abapgit_xml_input",
"zif_abapgit_gui_asset_manager",
"zcl_abapgit_version",
"zif_abapgit_gui_functions",
"zif_abapgit_gui_hotkey_ctl",
"zif_abapgit_gui_hotkeys",
"zif_abapgit_gui_renderable",
"zif_abapgit_gui_services",
"zif_abapgit_html",
"zif_abapgit_http_agent",
"zif_abapgit_http_response",
"zif_abapgit_log",
"zif_abapgit_merge",
"zif_abapgit_persistence",
"zif_abapgit_progress",
"zif_abapgit_stage_logic",
"zif_abapgit_tag_popups"
],
"output_folder": "output",
"lib": "https://github.com/open-abap/open-abap",
@ -27,14 +56,6 @@
"unknownTypes": "runtimeError",
"skip": [
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_test", "method": "test_direct_text"},
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_test", "method": "test_t100_text1"},
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_test", "method": "test_t100_text2"},
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_test", "method": "test_t100_text3"},
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_test", "method": "test_t100_text4"},
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_test", "method": "test_t100_text5"},
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_test", "method": "test_t100_text6"},
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_test", "method": "test_t100_text7"},
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_test", "method": "test_t100_text8"},
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_test", "method": "test_no_text"},
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_get_t100_longtext", "method": "test01"},
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_split_text", "method": "test_set_msg_b"},
@ -44,7 +65,8 @@
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_split_text", "method": "test_set_msg_z"},
{"object": "ZCL_ABAPGIT_HASH", "class": "ltcl_test", "method": "sha1_raw_invalid"},
{"object": "ZCL_ABAPGIT_URL", "class": "ltcl_test", "method": "repo_error"},
{"object": "ZCL_ABAPGIT_URL", "class": "ltcl_test", "method": "url_validate3"}
{"object": "ZCL_ABAPGIT_URL", "class": "ltcl_test", "method": "url_validate3"},
{"object": "ZCL_ABAPGIT_HTML", "class": "ltcl_html", "method": "style1"}
]
}
}

View File

@ -13,9 +13,9 @@
"url": "git+https://github.com/abapGit/abapGit.git"
},
"devDependencies": {
"@abaplint/cli": "^2.63.2",
"@abaplint/transpiler-cli": "^1.0.23",
"@abaplint/runtime": "^1.0.22",
"@abaplint/cli": "^2.63.6",
"@abaplint/transpiler-cli": "^1.0.40",
"@abaplint/runtime": "^1.0.40",
"abapmerge": "^0.14.2",
"eslint": "^7.16.0"
}

View File

@ -149,14 +149,14 @@ CLASS ltcl_syntax_cases DEFINITION FINAL FOR TESTING RISK LEVEL HARMLESS
METHODS:
do_test IMPORTING iv_line TYPE string
iv_filename TYPE string,
generate_parse IMPORTING iv_token TYPE char01
generate_parse IMPORTING iv_token TYPE c
iv_offset TYPE i
iv_length TYPE i,
generate_order IMPORTING iv_token TYPE char01
generate_order IMPORTING iv_token TYPE c
iv_offset TYPE i
iv_length TYPE i
iv_text_tag TYPE string,
generate_extend IMPORTING iv_token TYPE char01
generate_extend IMPORTING iv_token TYPE c
iv_offset TYPE i
iv_length TYPE i
iv_text_tag TYPE string,
@ -190,14 +190,14 @@ CLASS ltcl_syntax_cases IMPLEMENTATION.
cl_abap_unit_assert=>assert_equals( exp = mt_after_parse
act = lt_matches_act
msg = | Error during parsing: { iv_line }| ).
msg = |Error during parsing: { iv_line }| ).
lo_syntax->order_matches( EXPORTING iv_line = iv_line
CHANGING ct_matches = lt_matches_act ).
cl_abap_unit_assert=>assert_equals( exp = mt_after_order
act = lt_matches_act
msg = | Error during ordering: { iv_line }| ).
msg = |Error during ordering: { iv_line }| ).
lo_syntax->extend_matches(
EXPORTING
@ -207,7 +207,7 @@ CLASS ltcl_syntax_cases IMPLEMENTATION.
cl_abap_unit_assert=>assert_equals( exp = mt_after_extend
act = lt_matches_act
msg = | Error during extending: { iv_line }| ).
msg = |Error during extending: { iv_line }| ).
" Check consistency
lv_offs = 0.

View File

@ -121,14 +121,14 @@ CLASS ltcl_syntax_cases DEFINITION FINAL FOR TESTING RISK LEVEL HARMLESS
METHODS:
do_test IMPORTING iv_line TYPE string
iv_filename TYPE string,
generate_parse IMPORTING iv_token TYPE char01
generate_parse IMPORTING iv_token TYPE c
iv_offset TYPE i
iv_length TYPE i,
generate_order IMPORTING iv_token TYPE char01
generate_order IMPORTING iv_token TYPE c
iv_offset TYPE i
iv_length TYPE i
iv_text_tag TYPE string,
generate_extend IMPORTING iv_token TYPE char01
generate_extend IMPORTING iv_token TYPE c
iv_offset TYPE i
iv_length TYPE i
iv_text_tag TYPE string,

View File

@ -31,8 +31,8 @@ CLASS ltcl_html IMPLEMENTATION.
mo_html->add( 'hello world' ).
mo_html->add( '</td>' ).
lv_exp = '<td>' && zif_abapgit_definitions=>c_newline &&
' hello world' && zif_abapgit_definitions=>c_newline &&
lv_exp = '<td>' && cl_abap_char_utilities=>newline &&
' hello world' && cl_abap_char_utilities=>newline &&
'</td>'.
cl_abap_unit_assert=>assert_equals(
@ -49,8 +49,8 @@ CLASS ltcl_html IMPLEMENTATION.
mo_html->add( '<input name="comment" type="text">' ).
mo_html->add( '</td>' ).
lv_exp = '<td>' && zif_abapgit_definitions=>c_newline &&
' <input name="comment" type="text">' && zif_abapgit_definitions=>c_newline &&
lv_exp = '<td>' && cl_abap_char_utilities=>newline &&
' <input name="comment" type="text">' && cl_abap_char_utilities=>newline &&
'</td>'.
cl_abap_unit_assert=>assert_equals(
@ -67,8 +67,8 @@ CLASS ltcl_html IMPLEMENTATION.
mo_html->add( '<textarea name="body" rows="10" cols="72"></textarea>' ).
mo_html->add( '</td>' ).
lv_exp = '<td>' && zif_abapgit_definitions=>c_newline &&
' <textarea name="body" rows="10" cols="72"></textarea>' && zif_abapgit_definitions=>c_newline &&
lv_exp = '<td>' && cl_abap_char_utilities=>newline &&
' <textarea name="body" rows="10" cols="72"></textarea>' && cl_abap_char_utilities=>newline &&
'</td>'.
cl_abap_unit_assert=>assert_equals(
@ -85,8 +85,8 @@ CLASS ltcl_html IMPLEMENTATION.
mo_html->add( 'foo<br>bar' ).
mo_html->add( '</td>' ).
lv_exp = '<td>' && zif_abapgit_definitions=>c_newline &&
' foo<br>bar' && zif_abapgit_definitions=>c_newline &&
lv_exp = '<td>' && cl_abap_char_utilities=>newline &&
' foo<br>bar' && cl_abap_char_utilities=>newline &&
'</td>'.
cl_abap_unit_assert=>assert_equals(
@ -106,11 +106,11 @@ CLASS ltcl_html IMPLEMENTATION.
mo_html->add( '}' ).
mo_html->add( '</style>' ).
lv_exp = '<style type="text/css">' && zif_abapgit_definitions=>c_newline &&
' .class1 { color: red }' && zif_abapgit_definitions=>c_newline &&
' .class2 {' && zif_abapgit_definitions=>c_newline &&
' color: red' && zif_abapgit_definitions=>c_newline &&
' }' && zif_abapgit_definitions=>c_newline &&
lv_exp = '<style type="text/css">' && cl_abap_char_utilities=>newline &&
' .class1 { color: red }' && cl_abap_char_utilities=>newline &&
' .class2 {' && cl_abap_char_utilities=>newline &&
' color: red' && cl_abap_char_utilities=>newline &&
' }' && cl_abap_char_utilities=>newline &&
'</style>'.
cl_abap_unit_assert=>assert_equals(

View File

@ -140,7 +140,7 @@ CLASS ZCL_ABAPGIT_LOGIN_MANAGER IMPLEMENTATION.
CONCATENATE iv_username ':' iv_password INTO lv_concat.
rv_auth = cl_http_utility=>if_http_utility~encode_base64( lv_concat ).
rv_auth = cl_http_utility=>encode_base64( lv_concat ).
CONCATENATE 'Basic' rv_auth INTO rv_auth
SEPARATED BY space.