mirror of
https://github.com/abapGit/abapGit.git
synced 2025-04-30 11:46:38 +08:00
run more unit tests via transpiler (#6061)
This commit is contained in:
parent
aac1a14830
commit
c79e0e2dd2
12
package.json
12
package.json
|
@ -26,12 +26,12 @@
|
|||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@abaplint/cli": "^2.95.13",
|
||||
"@abaplint/database-sqlite": "^2.4.0",
|
||||
"@abaplint/runtime": "^2.4.8",
|
||||
"@abaplint/transpiler-cli": "^2.4.8",
|
||||
"@abaplint/cli": "^2.95.23",
|
||||
"@abaplint/database-sqlite": "^2.5.0",
|
||||
"@abaplint/runtime": "^2.5.4",
|
||||
"@abaplint/transpiler-cli": "^2.5.4",
|
||||
"abapmerge": "^0.14.8",
|
||||
"c8": "^7.12.0",
|
||||
"eslint": "^8.33.0"
|
||||
"c8": "^7.13.0",
|
||||
"eslint": "^8.34.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ CLASS ltcl_test_base DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT A
|
|||
METHODS:
|
||||
add_file IMPORTING iv_url TYPE string
|
||||
iv_content TYPE string OPTIONAL
|
||||
RAISING zcx_abapgit_exception.
|
||||
RAISING zcx_abapgit_exception.
|
||||
DATA:
|
||||
mo_asset_manager TYPE REF TO zcl_abapgit_gui_asset_manager,
|
||||
mo_cut TYPE REF TO zcl_abapgit_gui_css_processor.
|
||||
|
@ -201,12 +201,52 @@ ENDCLASS.
|
|||
CLASS ltcl_multiple_files DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT INHERITING FROM ltcl_test_base.
|
||||
PUBLIC SECTION.
|
||||
METHODS:
|
||||
test_simple FOR TESTING RAISING zcx_abapgit_exception,
|
||||
test_overwrite FOR TESTING RAISING zcx_abapgit_exception.
|
||||
PROTECTED SECTION.
|
||||
PRIVATE SECTION.
|
||||
ENDCLASS.
|
||||
|
||||
CLASS ltcl_multiple_files IMPLEMENTATION.
|
||||
METHOD test_simple.
|
||||
DATA: lv_file1 TYPE string,
|
||||
lv_file2 TYPE string,
|
||||
lv_act TYPE string,
|
||||
lv_expected TYPE string.
|
||||
|
||||
lv_file1 =
|
||||
`:root {\n` &&
|
||||
` --var2: var(--var3);\n` &&
|
||||
` --var3: 6;\n` &&
|
||||
`}`.
|
||||
REPLACE ALL OCCURRENCES OF '\n' IN lv_file1 WITH cl_abap_char_utilities=>newline.
|
||||
add_file( iv_url = 'file1.css'
|
||||
iv_content = lv_file1 ).
|
||||
mo_cut->add_file( 'file1.css' ).
|
||||
|
||||
lv_file2 =
|
||||
`:root {\n` &&
|
||||
` --var3: 19;\n` &&
|
||||
`}`.
|
||||
REPLACE ALL OCCURRENCES OF '\n' IN lv_file2 WITH cl_abap_char_utilities=>newline.
|
||||
add_file( iv_url = 'file2.css'
|
||||
iv_content = lv_file2 ).
|
||||
mo_cut->add_file( 'file2.css' ).
|
||||
|
||||
lv_expected =
|
||||
`:root {\n` &&
|
||||
` --var2: 19;\n` &&
|
||||
` --var3: 6;\n` &&
|
||||
`}\n` &&
|
||||
`:root {\n` &&
|
||||
` --var3: 19;\n` &&
|
||||
`}`.
|
||||
REPLACE ALL OCCURRENCES OF '\n' IN lv_expected WITH cl_abap_char_utilities=>newline.
|
||||
|
||||
cl_abap_unit_assert=>assert_equals( act = mo_cut->process( )
|
||||
exp = lv_expected ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD test_overwrite.
|
||||
DATA: lv_file1 TYPE string,
|
||||
lv_file2 TYPE string,
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
"input_folder": "{test,src,deps}",
|
||||
"input_filter": [
|
||||
"deps/",
|
||||
"\\.w3mi.",
|
||||
"src/ui/zcl_abapgit_e",
|
||||
"src/zcl_abapgit_e",
|
||||
"zcl_abapgit_adt_link",
|
||||
|
@ -72,15 +73,11 @@
|
|||
"extraSetup": "../test/setup.mjs",
|
||||
"skip": [
|
||||
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_get_t100_longtext", "method": "test01", "note": "implement function module DOCU_GET, open-abap"},
|
||||
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_split_text", "method": "test_set_msg_c", "note": "probably some bug in fm TEXT_SPLIT"},
|
||||
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_split_text", "method": "test_set_msg_z", "note": "probably some bug in fm TEXT_SPLIT"},
|
||||
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_t100", "method": "text6", "note": "uses MSAG from database"},
|
||||
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_t100", "method": "text7", "note": "uses MSAG from database"},
|
||||
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_t100", "method": "text8", "note": "uses MSAG from database"},
|
||||
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_general", "method": "direct_text"},
|
||||
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_longtext", "method": "empty_longtext"},
|
||||
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_longtext", "method": "longtext"},
|
||||
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_longtext", "method": "multiline_longtext"},
|
||||
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_split_text", "method": "test_set_msg_z", "note": "some bug in fm TEXT_SPLIT in open-abaå"},
|
||||
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_t100", "method": "text6", "note": "uses MSAG from database"},
|
||||
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_t100", "method": "text7", "note": "uses MSAG from database"},
|
||||
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_t100", "method": "text8", "note": "uses MSAG from database"},
|
||||
{"object": "ZCX_ABAPGIT_EXCEPTION", "class": "ltcl_longtext", "method": "empty_longtext", "note": "implement function module DOCU_GET, open-abap"},
|
||||
|
||||
{"object": "ZCL_ABAPGIT_XML_PRETTY", "class": "ltcl_test", "method": "pretty1", "note": "open-abap does not add the byte order mark"},
|
||||
{"object": "ZCL_ABAPGIT_XML_PRETTY", "class": "ltcl_test", "method": "pretty2", "note": "open-abap does not add the byte order mark"},
|
||||
|
@ -100,7 +97,6 @@
|
|||
|
||||
{"object": "ZCL_ABAPGIT_FILE_STATUS", "class": "ltcl_calculate_status", "method": "complete", "note": "??"},
|
||||
{"object": "ZCL_ABAPGIT_FILE_STATUS", "class": "ltcl_calculate_status", "method": "only_local2", "note": "? sy-subrc = 4 vs 8 ?"},
|
||||
{"object": "ZCL_ABAPGIT_FILE_STATUS", "class": "ltcl_calculate_status", "method": "only_remote3", "note": "??"},
|
||||
|
||||
{"object": "ZCL_ABAPGIT_PERSIST_PACKAGES", "class": "ltcl_packages", "method": "test_package", "note": "ZABAPGIT table not existing, error cx_sy_dynamic_osql_semantics"},
|
||||
|
||||
|
@ -125,9 +121,6 @@
|
|||
{"object": "ZCL_ABAPGIT_REQUIREMENT_HELPER", "class": "ltcl_formats", "method": "shorter_patch", "note": "Void type: CVERS_SDU"},
|
||||
{"object": "ZCL_ABAPGIT_REQUIREMENT_HELPER", "class": "ltcl_formats", "method": "higher_patch", "note": "Void type: CVERS_SDU"},
|
||||
|
||||
{"object": "ZCL_ABAPGIT_GUI_ASSET_MANAGER", "class": "ltcl_abapgit_gui_asset_manager", "method": "get_mime_asset", "note": "todo in open-abap fm WWWPARAMS_READ"},
|
||||
{"object": "ZCL_ABAPGIT_GUI_CSS_PROCESSOR", "class": "ltcl_multiple_files", "method": "test_overwrite", "note": "??"},
|
||||
|
||||
{"object": "ZCL_ABAPGIT_XML", "class": "ltcl_xml", "method": "space_leading_trailing", "note": "close to working, https://github.com/open-abap/open-abap-core/pull/557 "},
|
||||
{"object": "ZCL_ABAPGIT_XML", "class": "ltcl_xml", "method": "bad_xml_raises_exc", "note": "handling of xml parser errors, cl_ixml, test method parse_negative"},
|
||||
{"object": "ZCL_ABAPGIT_XML_OUTPUT", "class": "ltcl_xml_output", "method": "render_xml_string", "note": "kernel_call_transformation.mi_writer.get(...).if_sxml_writer$open_element is not a function"},
|
||||
|
|
Loading…
Reference in New Issue
Block a user